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.

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

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看