使用facebook API检索完整的朋友列表[复制]

参见英文答案 > Facebook Graph API v2.0+ – /me/friends returns empty, or only friends who also use my application                                    6个
新的2.0版本有一个分页,限制一个请求的朋友数量,这不允许我一次检索所有朋友,虽然有一个参数调用’限制’,它只能通过循环’偏移’直到结束.问题是每个用户都有不同数量的朋友!

我一直在寻找几个小时,但仍然没有解决方案..

如Graph API v2.0升级指南( https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids)中所述

/me/friends returns the user’s friends who are also using your app In
v2.0, the friends API endpoint returns the list of a person’s friends
who are also using your app
. In v1.0, the response included all of a
person’s friends
.

There are two key use cases where apps need access to non-app friends:
tagging and inviting. In v2.0, we’ve added the Taggable Friends API
and the Invitable Friends API to support these flows.

After a person has logged in with v2.0 of Facebook Login, calling
/v1.0/me/friends and/v2.0/me/friends` will both result in the v2.0
behaviour – both calls will return the set of the person’s friends who
also use the app.

因此,在v2.0中,您只能通过/ me / taggable_friends(https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends)端点获取所有朋友,该端点仅包含字段ID,名称,图片,并且只能在审核您的应用后使用Facebook的.

相关文章
相关标签/搜索