【发布时间】:2016-07-09 04:01:35
【问题描述】:
我在我的代码中添加了 fb.ui 提要对话框,以便在用户的 facebook 时间轴上发布一些带有图像的动态内容。
它在 Firefox 上运行良好,但我的问题是,当用户未在同一浏览器上登录 facebook 时,它第一次要求用户登录,登录后它要求用户在 facebook 上发布,发布后它在 chrome 中返回空回调和移动设备。
请大家帮忙。
FB.ui({
method: 'feed',
name: 'name here',
link: 'link here',
display: 'popup',
picture: 'image url',
//caption: 'Example Coupon',
//redirect_uri: '',
description: 'description here'
},
function(response) {
console.log(response);//here it returns [] but post published, when user not logged onto facebook, when user already loggedin it return post_id
if (response && response.post_id) {
self.location.href = 'myurl.com?post_id='+response.post_id;
//alert('Post was successfull published.');
} else {
alert('Post was not published. An Error occured');
}
});
【问题讨论】:
-
看我的回答。如果我可以问,你为什么想知道用户是否仍然发布?
-
如果它只发布成功,那么用户将在我的场景中前进。
-
那是不允许的。您不得以任何方式获取内容或奖励在他的墙上发布内容的用户。
-
那里有提到吗?
-
平台政策中有提及,您必须在创建任何应用程序之前阅读它。
标签: javascript facebook-graph-api facebook-javascript-sdk fb.ui