Javascript Facebook stream.share返回未定义
为什么当用户发布状态或单击“跳过”时,FacebookJavascript Facebook stream.share返回未定义,javascript,facebook,Javascript,Facebook,为什么当用户发布状态或单击“跳过”时,Facebookstream.share返回未定义 我目前正在尝试使用它,因此如果用户不发布内容,则不应执行任何操作,但如果用户发布内容,则应执行操作 如何执行此操作?您可以使用graph API提要对话框发布帖子,并知道用户是否发布了帖子: FB.ui( { method: 'feed', message: '', name: 'name here', caption: 'captio
stream.share
返回未定义
我目前正在尝试使用它,因此如果用户不发布内容,则不应执行任何操作,但如果用户发布内容,则应执行操作
如何执行此操作?您可以使用graph API提要对话框发布帖子,并知道用户是否发布了帖子:
FB.ui(
{
method: 'feed',
message: '',
name: 'name here',
caption: 'caption here',
description: 'description here',
picture: 'picture url here',
link: 'http://yourlinkurlhere.com',
actions : [{name : 'action name', link : 'action link'}]
},
function(response) {
if (response && response.post_id) {
// Post was published
} else {
// Post did get published
}
});
您可以使用“图形API提要”对话框发布帖子,并知道该帖子是否由用户发布:
FB.ui(
{
method: 'feed',
message: '',
name: 'name here',
caption: 'caption here',
description: 'description here',
picture: 'picture url here',
link: 'http://yourlinkurlhere.com',
actions : [{name : 'action name', link : 'action link'}]
},
function(response) {
if (response && response.post_id) {
// Post was published
} else {
// Post did get published
}
});