dpv21589 2013-10-11 01:46
浏览 46
已采纳

PHP Facebook API就像一篇文章

I am doing a website (PHP /MySQL - Facebook SDK), user can login facebook, retrieve their posted (photos, links - with Public permisison) on facebook wall. Then they can show their posted on my site and another facebook user can Like / Share the post from my site.

When a user Like / Share. I call facebook API to update on Facebook also. But I have a problem with Like API.

I used $facebook->api("/$postid/likes", 'post', array('access_token' => $access_token);

I works OK if I Like my posted or my friends posted. But when I Like a posted of user who is not friend it log the error "#210 - User is not visible". I use the app permission: "email, user_birthday, user_likes, user_photos, friends_photos, publish_stream, user_status, read_stream, publish_actions, manage_pages".

Is it possible to do it with FB API or I missed some permission? Please help me!

  • 写回答

1条回答 默认 最新

  • dos3018 2013-10-11 03:47
    关注

    You cannot send a like on an Open Graph object that is not visible by the user in who's name you're doing the action.

    So, if someone posted something on Facebook only to his friend, you cannot send a like action from someone who's not his friend.

    You should work the logic of how and to whom you display user content... I'm also pretty sure you're not allowed to display private content from a user by the Facebook term of use.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?