Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Facebook stream.share返回未定义_Javascript_Facebook - Fatal编程技术网

Javascript Facebook stream.share返回未定义

Javascript Facebook stream.share返回未定义,javascript,facebook,Javascript,Facebook,为什么当用户发布状态或单击“跳过”时,Facebookstream.share返回未定义 我目前正在尝试使用它,因此如果用户不发布内容,则不应执行任何操作,但如果用户发布内容,则应执行操作 如何执行此操作?您可以使用graph API提要对话框发布帖子,并知道用户是否发布了帖子: FB.ui( { method: 'feed', message: '', name: 'name here', caption: 'captio

为什么当用户发布状态或单击“跳过”时,Facebook
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
        }

});