/** !FACEBOOK JS WITH SUBSCRIBE EVENT **/ window.fbAsyncInit = function() { FB.init({ appId: '798296716878672', status: true, cookie: true, xfbml: true, oauth: true }); FB.Event.subscribe('comment.create', comment_create); FB.Event.subscribe('comment.remove', comment_delete); var sharecount_exist = $(document).find('.share-aggregator a'); if(sharecount_exist.length > 0) { FB.Event.subscribe('edge.create', function(response) { $('.share-aggregator a[data-url="'+response+'"]').each(function() { var count = $(this).html(); $(this).html(parseInt(count) + 1); }); }); } }; (function(d) { var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; } js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/it_IT/all.js"; d.getElementsByTagName('head')[0].appendChild(js); }(document));