$.getJSON("https://graph.facebook.com/http://blog.eduzones.com/magazine/185496?callback=?", function(data) { $.ajax({ type: "POST", url: "/update_social_stat.ajax.php", data: "do=updatefacebook&id=185496&stat=" + data.shares, success: function(msg) { } }); }); $.getJSON("https://urls.api.twitter.com/1/urls/count.json?url=http://blog.eduzones.com/magazine/185496&callback=?", function(data) { $.ajax({ type: "POST", url: "/update_social_stat.ajax.php", data: "do=updatetwitter&id=185496&stat=" + data.count, success: function(msg) { } }); }); $.ajax({ type: "POST", url: "/update_social_stat.ajax.php", data: "do=updategoogle&id=185496&url=http://blog.eduzones.com/magazine/185496", success: function(msg) { } });