Coder Social home page Coder Social logo

Google+ like counter? about socialshare HOT 6 CLOSED

gladson avatar gladson commented on May 28, 2024
Google+ like counter?

from socialshare.

Comments (6)

AyumuKasuga avatar AyumuKasuga commented on May 28, 2024

unfortunately, google plus has not jsonp url for like counters now ((.
issue on code google about this: https://code.google.com/p/google-plus-platform/issues/detail?id=420

if they will add method for crossdomain request (CORS or JSONP), i will add too.

from socialshare.

njt1982 avatar njt1982 commented on May 28, 2024

Dirty Dirty hack to get around CORS...

jQuery.getJSON('http://anyorigin.com/dev/get/?callback=?&url=https%3A%2F%2Fplusone.google.com%2F_%2F%2B1%2Ffastbutton%3Furl%3Dhttp%3A%2F%2Fgoogle.com', function(data) { console.log(data.contents.match(/window\.__SSR = {c: ([\d]+)/)[1]); });

Services like this:

from socialshare.

mschilder avatar mschilder commented on May 28, 2024

Does this help? http://stackoverflow.com/questions/7403553/how-do-i-get-the-counter-of-a-google-plus-1-button/7409062#7409062

from socialshare.

AyumuKasuga avatar AyumuKasuga commented on May 28, 2024

@mschilder unfortunately no, url https://plusone.google.com/_/+1/fastbutton returns data with text/html content type and without Access-Control-Allow-Origin header, browsers blocks these requests :(

from socialshare.

koddr avatar koddr commented on May 28, 2024

Check my share buttons project https://github.com/enjoyiacm/goodshare.js/blob/master/goodshare.js#L322-L344
I made a Google Plus share count through the $.ajax() without another services. Work fast & great!

P.S. if it's help you — click GitHub Star button in my goodshare.js repo. Thx :)

from socialshare.

AyumuKasuga avatar AyumuKasuga commented on May 28, 2024

@enjoyiacm thank you a lot!

from socialshare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.