I have a webpage where I have placed a Facebook like & share button and corresponding javascript callback functions are also present.
Now the problem is, the jav
full code is here
$("#bodyarea").on('click', '.share_fb', function(event) {
event.preventDefault();
var that = $(this);
var post = that.parents('article.post-area');
$.ajaxSetup({ cache: true });
$.getScript('//connect.facebook.net/en_US/sdk.js', function(){
FB.init({
appId: '822306031169238', //replace with your app ID
version: 'v2.3'
});
FB.ui({
method: 'share',
title: 'TTitle Test',
description: 'Test Description Goes here. Tahir Sada ',
href: 'https://developers.facebook.com/docs/',
},
function(response) {
if (response && !response.error_code) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
});
});
});
Change your application id to work
Working Example