1
votes

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

1 Answers

0
votes

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.