I am sharing a facebook page on my Timeline and holding a response in a callback
. But each time it fails and callback response throws following error:
Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings.
Here is the HTML Element on which I'm calling the method.
<a onclick="shareonfacebook()"><i class="fa fa-facebook"></i>facebook</a>
And this is the callback method for my facebook button
function shareonfacebook(){
FB.init({
appId : 'APP ID',
xfbml : true,
version : 'v2.8'
});
FB.ui({
method: 'share',
href: 'http://promo.globalhellogroup.com',
}, function(response){
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
});
}
Response is always that error message.