I have a button "share on Facebook" in my website. When the user clicks on it, it opens a popup to share a picture on his profile. This works but I have a problem with the callback (I want to know if the user has shared something or just closed the popup without sharing anything).
I am trying to get the callback response in jquery
. I have exactly the same problem as in this post:
FB.ui feed not giving a callback. Unfortunately, the accepted answer just says to empty the cache, which did not work for me.
My code :
FB.ui(
{
method: 'feed',
name: 'Share a photo',
link: url,
picture: path,
},
function(response)
{
if (response && response.post_id)
{
window.console&&console.log('Post was published.');
}
else
{
window.console&&console.log('Post was not published.');
}
});
Why is the response empty?