Within Nigeria is an authoritative online news media that focuses on publishing trending topics in a rich combination of national news, politics, metro, entertainment, celebrity gossip, press releases, opinions, editorials, and trending happenings inside Africa and world news
function appendFbScript() { var js, id = ‘facebook-jssdk’, fjs = document.getElementsByTagName(‘script’)[0];
if (document.getElementById(id)) return; js = document.createElement(‘script’); js.id = id; js.src = “http://connect.facebook.net/en_US/sdk.js#xfbml=1&appId=350700568666931&version=v2.0”; fjs.parentNode.insertBefore(js, fjs);
window.fbAsyncInit = function () { FB.init({ appId: ‘350700568666931’, xfbml: true, version: ‘v2.0’ }); FB.Event.subscribe(‘comment.create’, function (comment_data) { console.log(comment_data); update_comments_count(); }); FB.Event.subscribe(‘comment.remove’, function (comment_data) { update_comments_count(); });
function update_comments_count(comment_data, comment_action) { jQuery.ajax({ type: ‘GET’, dataType: ‘json’, url: ‘https://www.withinnigeria.com/wp-admin/admin-ajax.php’, data: { action: ‘clear_better_facebook_comments’, post_id: ‘306377’ }, success: function (data) { // todo sync comments count here! data have the counts }, error: function (i, b) { // todo } } ) }; };
appendFbScript(); }
appendFbScript();
})();
Related Posts
You may be interested
Arteta Provides Injury Updates On Five Arsenal Players Ahead Palace Clash
Webby - December 20, 2024Arsenal manager Mikel Arteta has revealed that Declan Rice and Riccardo Calafiori are both available to be in the Gunners…
Carabao Cup: Spurs Edge Man United In Seven-Goal Thriller To Reach Semi-finals
Webby - December 19, 2024Tottenham Hotspur edged Manchester United 4-3 in the quarter-finals of the Carabao Cup on Thursday.Spurs raced to a 3-0 lead…
Pogba’s Brother Sentenced To Three Years In Prison
Webby - December 19, 2024Mathias Pogba, brother of former Manchester United star Paul Pogba, was sentenced Thursday by a Paris criminal court to three…