Facebook error: “(#100) Tried accessing nonexisting field (user_friends) on node type (User)”

[亡魂溺海] 提交于 2019-12-05 17:42:40

问题


I'm using MVC4 and try to integrate facebook-login. I've check the facebook scope list and it appears I use it correctly. Except the error when I try to get user_friends

Here is the url I try to get:

https://graph.facebook.com/me?fields=user_friends,email&access_token=<mytoken>

I get this error:

"{\"error\":{\"message\":\"(#100) Tried accessing nonexisting field (user_friends) on node type (User)\",\"type\":\"OAuthException\",\"code\":100,\"fbtrace_id\":\"Ahhh3PoddnL\"}}"

If you must know, my app is now Public, can get email and basic info (the permissions was asked and I approved)

When I use as below everything is fine:

https://graph.facebook.com/me?fields=email&access_token=<mytoken>

回答1:


user_friends is the name of the permission you need to request from the user, before you can access their friends.

It is not the name of the endpoint that you request the data from – that is /me/friends, see https://developers.facebook.com/docs/graph-api/reference/user/friends



来源:https://stackoverflow.com/questions/39266102/facebook-error-100-tried-accessing-nonexisting-field-user-friends-on-node

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!