背景:
我正在使用 Facebook Graph API 获取出现在用户墙上的每条帖子。为此,我们让用户使用 Facebook 登录,并在用户注册时向其请求 user_posts
许可。获取我们一直调用的帖子
me/feed?fields=created_time,id,message,from{name,picture.height(48).width(48),id}&date_format=U&access_token={用户 token }
问题:
这将返回出现在用户墙上的所有帖子, 用户被标记且隐私设置不是public
的帖子除外。如何获取这些标记了用户但隐私设置设置为 friends
或 friends of friends
的帖子?
这可能是一个错误吗?
Facebook 文档说:
Your app needs user_posts permission from the person who created the post or the person tagged in the post. Then your app can read:
Timeline posts from the person who gave you the permission.
The posts that other people made on that person Timeline.
The posts that other people have tagged that person in.
我很难很好地阐明这个问题,所以我将以我自己的 Facebook 帐户为例。我墙上的 3 个最新帖子中有 1 个是我被标记的帖子。我被标记的帖子有 friend 的隐私设置。我被标记的帖子没有出现在图谱 API 浏览器输出中。
这是我墙上的 3 个最新的 Facebook 帖子:
这是 Graph API Explorer 的输出:
这是 token 的权限:
图谱 API Explorer 输出中未包含帖子的隐私设置:
只是重申主要问题:如果用户的隐私设置为 public
,则图形 API 仅返回标记用户的帖子。
感谢您花时间提供帮助。
最佳答案
这似乎是一个错误。我把它报告给了 Facebook 。这是错误报告的链接:https://developers.facebook.com/bugs/284611378567364截至 8-3-16 太平洋时间晚上 10:20,它说错误已确认。
关于Facebook 图形 API : Getting all posts a user is tagged in even if the privacy setting is set to friends only,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38670358/