Getting count of Facebook, Twitter and LinkedIn shares for given url

If you want to get share count of given url on Facebook, Twitter or LinkedIn you can use these json calls.

https://graph.facebook.com/?id=[url]
https://cdn.api.twitter.com/1/urls/count.json?url=[url]
https://www.linkedin.com/countserv/count/share?url=[url]
function getCounts(url) { $.getJSON(‘https://graph.facebook.com/?id=' + url’, function(data) { $(‘#facebookCount’).html(data.count); }); $.getJSON(‘http://urls.api.twitter.com/1/urls/count.json?url=' + url’, function(data) { $(‘#twitterCount’).html(data.count); }); $.getJSON(‘https://www.linkedin.com/countserv/count/share?url=' + url’, function(data) { $(‘#linkedinCount’).html(data.count); }); }