In the parent page, I have a share button to call FB.ui(). I click the button and FB share modal popup as a separate window, then I close my parent page. Go back to my FB share window and share the content to fb wall. After I click the share button, the window becomes a white page(the url is https://www.facebook.com/dialog/feed). And the callback of FB.ui() is not called.
Do we have a solution? at least I want to have the callback work. I tried to add "redirect_uri" as it is proposed in this post FB.ui feed not giving a callback, but it doesn't change anything.
/* FB init */
window.fbAsyncInit = function() {
FB.init({
appId : '',
status : false,
xfbml : false,
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
shareButton.on('click', function(e) {
submitPost();
});
/* the function for share*/
function submitPost() {
FB.ui({
method: 'feed',
name: '',
link: '',
picture: '',
caption: '',
description: '',
}, function(response) {
if (response && response.post_id) {
// do something
}
});
}