“(#200)需要扩展权限:publish_actions”

时间:2017-02-08 10:07:40

标签: php facebook facebook-graph-api

如何解决?当我成功登录后尝试将照片发布到我的Facebook墙上时会发生这种情况。

FB.login(function(response) {
    if (response.authResponse) {
        shareOnFacebook();
    }
}, {
    scope: 'publish_actions'
});

function shareOnFacebook() {
    FB.api('/me/photos/', 'post', {
        url: "<?php echo $fb_pic;?>",
        message: $("#fb_message").text().replace("<br/>", "\n")
    }, function(response) {
        console.log(response);
        console.log('successful response ..successfully posted');
        $(".inviteshare .sendingmsg").hide();
        alert("Successfully posted on your Facebook wall");
    });
}

0 个答案:

没有答案