Get counts of share, likes of different social and bookmarking sites

May 19, 2013 | Miscellaneous, Web Development

Advertisement Social network and SEO

We have all been sharing stuffs and links to the social and bookmarking sites for long, and specially if you blog or visit blogs, you have a nice idea of sharing stuffs. A count of that is kept by every such sites to let you know how many times that particular link has been shared on that site. Ever wondered how to get those like or share counts without the like or share buttons? Say you want total counts of how many time your particular article has been liked on Facebook or tweeted on Twitter or stumbled upon on Stumbleupon, pinned in Pinterest. What I show you below will require basic json understanding. You can learn basics of json here. Once you get the json you can parse the json and print the count of shares or like as you wish. So here is how you get the like and share counts of different social and bookmarking sites.

  • Facebook
  • https://api.facebook.com/method/fql.query?query=select%20%20like_count%20from%20link_stat%20where%20url=%22http://codepixelz.com/%22

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

  • Twitter
  • http://urls.api.twitter.com/1/urls/count.json?url=http://codepixelz.com/

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

  • Linkedin
  • http://www.linkedin.com/countserv/count/share?url=http://codepixelz.com/

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

  • Google+
  • http://www.linkedin.com/countserv/count/share?url=http://codepixelz.com&format=json

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

  • Stumble Upon
  • http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://codepixelz.com

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

  • Pinterest
  • http://api.pinterest.com/v1/urls/count.json?callback=&url=http://codepixelz.com

    Replace: http://codepixelz.com/ with the page or link you want the counts for.

Author Information
Utsav Singh Rathour
Utsav Singh Rathour is a blogger and developer for over 5 years and believes in building applications that not only tackles the problem but gives users a better interface. He is founder of Code Pixelz Media and blogs mainly at this place. Follow him at @rathour

Leave a Reply



Avada WordPress Theme, Theme Fusion, Highest selling theme on themeforest.net, themeforest highest seller

  • Like us on Facebook

  • Tags

  • css.php
    WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera