Facebook error: “(#100) Tried accessing nonexistin

2020-07-04 13:24发布

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条回答
相关推荐>>
2楼-- · 2020-07-04 13:57

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

查看更多
登录 后发表回答