FB.ui分享对话帖子和取消都有相同的回应

FB.ui share dialog post and cancel have the same response

本文关键字:回应 取消 分享 ui 对话 FB      更新时间:2023-09-26

我有下面的代码:

FB.ui({
        method: 'share',
        title: 'test',
        href: 'http://google.com',
        picture: 'http://google.com/blah.jpg',
        caption: 'test caption',
        description: 'test description'
}, function(response) {
    if (response && !response.error_code) {
        window.location="{{ config('app.url') }}/user/share/" + announcementId;
    } else {
        window.location=redirectUrl;
    }
});

共享对话框中对cancel和post到facebook的响应为空数组。当用户单击"取消"按钮时,我将如何跟踪用户?

唯一的方法是实现登录并获得用户批准的"publish_actions"。这样做,如果发布,您将在响应中返回一个"post_id"。

注意:奖励共享用户违反FB条款