I have setup a share popup triggered by Jquery. It works, but I want to use the response value to trigger an AJAX call on success and Facebook only returns an empty array.
Here is the javascript
$("#fb-request").click(function () {
FB.ui({
method: 'share',
name: 'Check out website',
href: 'URL_TO_SHARE',
},
function (response) {
if (response && !response.error_code) {
console.log(response); // Returns: []
}
});
});
Because of this I can't make the difference between someone who posts and someone who uses the cancel button. Am I missing something here? Or is there something to setup on the Facebook App?
Thanks,