开发者

Facebook stream.share returns undefined

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜