Skip to content Skip to sidebar Skip to footer

Display Number Of Linkedin Shares, Client-only, Without Authentication

https://www.linkedin.com/countserv/count/share?url=stackoverflow.com&format=json correctly shows the number of shares for meteor.com (935 at the moment). I'm trying to display

Solution 1:

This looks like a duplicate of this post: Get LinkedIn share count JSONP

Here's the answer recomended over there:

myCallback = function(data) {
  alert(data.count);
};

var url = "https://www.linkedin.com/countserv/count/share?url=http://stackoverflow.com&format=jsonp&callback=myCallback";
$.getScript(url);

Here's a Fiddle to demonstrate: https://jsfiddle.net/z9u20ucm/1/

Post a Comment for "Display Number Of Linkedin Shares, Client-only, Without Authentication"