开发者

Facebook stream.share returns undefined

开发者 https://www.devze.com 2023-03-22 16:24 出处:网络
Why does Facebook stream.share return undefined when a user publish a status or click \"Skip\"? I\'m currently trying to use this, so if the user doesn\'t publish the content, no action should happen

Why does Facebook stream.share return undefined when a user publish a status or click "Skip"?

I'm currently trying to use this, so if the user doesn't publish the content, no action should happen, but if the user publish the content an action should happen.

开发者_运维百科

How do I do this?


You can use the graph API feed dialog to publish a post and know if it was published or not by the user:

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
        }

});
0

精彩评论

暂无评论...
验证码 换一张
取 消