我使用以下代码初始化fb ui:
<script>
window.fbAsyncInit = function () {
FB.init({
appId: '123555029137905', status: true, cookie: true,
xfbml: true
});
};
FB.ui(
{
method: 'feed',
name: Title,
link: 'http://google.com/',
caption: 'google.com',
description: Body,
picture: path,
message: 'abc'
}, function (response) {
if (response.post_id) {
bootbox.alert('Your milestone has been shared');
}
});
</script>
此代码运行良好。但有时当我点击页面上的按钮打开FB ui时会出错:http://prntscr.com/a82jp9
当我仔细观察它时,我发现它在url中没有app id.So,有人可以说明为什么会这样吗?