在 Graph API 或 FQL 中获取朋友列表 - 似乎缺少一些朋友 [英] Fetching list of friends in Graph API or FQL - Appears to be missing some friends

查看:20
本文介绍了在 Graph API 或 FQL 中获取朋友列表 - 似乎缺少一些朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

'me/friends' 图 api 或 friends FQL 表是否有可能只返回 一些 朋友?

Any chance the 'me/friends' graph api or friends FQL table return some friends only?

我检查了结果,比我在 facebook.com 上看到的数量略少

I've checked the results and it's slightly less than the count I see on facebook.com

推荐答案

In Graph API V1.0

用户对象上调用 /friends(例如 /me/friends)或查询 friend FQL 表 应该返回该用户的所有好友,除了

In Graph API V1.0

A call to /friends on a User object (e.g. /me/friends) or a query of the friend FQL table should return all friends of that user except

  1. 那些停用帐户的用户
  2. 那些屏蔽了您的应用的人
  3. 禁止所有平台应用访问其数据的人.- 如果用户启用此选项(见下文),您将无法通过 API 访问有关该用户的任何信息,包括他们的基本信息、发表的帖子等.他们不会出现在通过 API 获取应用用户的好友列表.
  1. Those who have deactivated their accounts
  2. Those who have blocked your app
  3. Those who have disabled all Platform apps from accessing their data. - If a user enables this option (see below) you can't access any information about that user via the API, including their basic info, posts they make, etc. They won't appear in the friends list of your app's user via the API.

如果您发现回复中没有朋友,那几乎可以肯定是由于其中一个原因,根据我的经验,大多数问这个问题的人都在问第三种情况.

If you find friends are missing from the response it's almost certainly for one of those reasons, and in my experience most people asking this question are asking about the third case.

删除平台选项的选项当前位于隐私设置 -> 广告、应用程序和;网站 -> '关闭您在 Facebook 内外使用应用、插件和网站的能力

The option to remove platform option is currently under Privacy Settings -> Ads, Apps & Websites -> 'Turn off your ability to use apps, plugins, and websites on and off Facebook

如果您没有在一次通话中获得所有朋友,并且您确定不是由于其中一个原因,请检查您的查询中是否有 limit 参数 - 并增加它如果它少于您认为应该出现的朋友数量.

If you're not getting all friends in a single call and you're sure it's not because of one of those reasons, check if you have a limit parameter in your query - and increase it if it's less than the number of friends you think should be appearing.

例如/me/friends?limit=5000 允许的最大好友数,5000

e.g. /me/friends?limit=5000 for the maximum number of friends allowed, 5000

请注意,好友计数将包括无法在列表中检索到的用户(例如 User FQL 表的 friend_count 字段)

Note that the friends count will include users which can't be retrieved in the list (e.g. the friend_count field of the User FQL table)

在 User 对象上调用 /friends 将,如果用户已授予您的应用 user_friends 权限,则返回该用户也授予您的好友应用 user_friends 权限 -

A call to /friends on a User object will, if the user has granted your app the user_friends permission, return the friends of that user who have also granted your app the user_friends permission -

您可以在 F​​acebook Graph Api v2.0+ -/me/friends 返回空,或仅返回也使用我的应用程序的朋友Facebook 的变更日志

这篇关于在 Graph API 或 FQL 中获取朋友列表 - 似乎缺少一些朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆