Im following this tutorial for creating my own Social Share buttons with counters: Social Share Tutorial And I can't figure out why the social share count won't come through.
It's a HubSpot site and the page is here
I've also set up a fiddle to show the code I'm using.
Any insight would be greatly appreciated!
This is the php file being called in the js.
The js:
function get_social_counts() {
var thisUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
$.ajax({
type: "GET",
url: 'http://cdn2.hubspot.net/hubfs/169677/social_sharing/get_social_counts.php? thisurl='+thisUrl,
dataType: "json",
success: function (data){
$('a.post-share.twitter span').html(data.twitter);
$('a.post-share.facebook span').html(data.facebook);
$('a.post-share.gplus span').html(data.gplus);
$('a.post-share.stumble span').html(data.stumble);
}
});
}
$(document).ready(function(){
get_social_counts();
});
Thanks