Facebook JavaScript SDK中是否存在在用户发表评论后触发的事件



我使用以下内容为通过您页面上的Facebook"点赞"按钮点赞我公司页面的用户显示优惠券。

FB.Event.subscribe('edge.create',
function(response) {
// action
}
);
};

当用户单击"点赞"按钮时,会出现一个框,询问他们是否想将其与消息一起发布到墙上,此时会进行回调以显示优惠券。

用户发布(或选择不发布)后是否会发生回调?

我在帖子中使用这样的东西,然后检查响应:

<script>
function fb_share() {
    FB.ui({
        method: 'feed',
        name: 'Name of App',
        link: 'http://YOURLINK.com',
        picture: 'someurltoimage.jpg',
        description: 'Your description of the post for the wall!'
        },
        function(response) {
        if (response && response.post_id) {
            console.debug(response.post_id);
        // Post was published - now lets send it to our ouwn custom processing page on our server
        $.post('/process-post',{uid: <?php echo $currentUser; ?>, wallpost: response.post_id},function(resp) {
                // callback after storing the requests
            });
        } else {
        // Post was not published;
        }
    });
return false;
}
</script> 

最新更新