我意识到,我是有在为什么我的朋友选择器片段空?是该片段运行正常,它只是因为我使用Facebook的Graph版本2.0,那只能说明当前正在使用的应用程序中的朋友(没有,只是我)。有一种解决方法,也可以使用有使用的应用程序的片段检索所有的朋友,而不仅仅是一些其他的许可?
解决方案看一看 https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
如果您使用的是图形API 2.0版,端点 / ME /朋友
将始终只显示其中也使用该应用程序的朋友。
报价:
有两个关键的使用情况下,应用程序需要访问非应用程序的朋友:标签,并邀请。在V2.0中,我们添加了Taggable友API和Invitable朋友API来支持这些流程。
链接:
的https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/ 的https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends/如果你只是想展现共同的朋友也使用的应用程序,你可以使用
/ {USER_ID} .context / mutual_friends
... user_friends
权限是必需使用的应用程序,以查看其他好友的共同的朋友。
有一个在我的答案在Fetch我和另一位用户之间的Facebook共同的朋友
I realized that the problem I was having on Why is my friend picker fragment empty? was that the fragment run fine, its just since i am using facebook graph version 2.0, it only shows the friends that are currently using the app(none, just me). Is there a workaround or some other permission you can use to have the fragment retrieve all friends, not just the ones using the app?
解决方案Have a look at https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
If you're using Graph API v2.0, the endpoint /me/friends
will always only show the friends which are also using the app.
Quote:
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.
Links:
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/ https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends/If you "just" want to show mutual friends which also use the app, you can use the
/{user_id}.context/mutual_friends
... user_friends
permission is required to view the mutual friends of other friends using the app.
Have a look at my answer at Fetch Facebook Mutual friends between me and another User
上一篇:实体框架4.1逆向工程code-只实体、框架、工程、code
下一篇:获取NoSuchFieldError INSTANCE组织/阿帕奇/ HTTP /消息/ BasicHeaderValueParser阿帕奇、消息、组织、NoSuchFieldError