Facebook错误:“(#100)尝试访问节点类型(User)上不存在的字段(user_friends)". [英] Facebook error: "(#100) Tried accessing nonexisting field (user_friends) on node type (User)"

查看:1373
本文介绍了Facebook错误:“(#100)尝试访问节点类型(User)上不存在的字段(user_friends)".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MVC4,并尝试集成Facebook登录.我检查了 facebook范围列表,它似乎在使用它正确.除了尝试获取user_friends

时出现的错误

这是我尝试获取的网址:

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

我收到此错误:

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

如果您必须知道,我的应用程序现在是公开的,可以获取电子邮件和基本信息(权限已获得我的批准)

当我如下使用时,一切都很好:

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

解决方案

user_friends是在访问其朋友之前需要向用户请求的权限的名称.

您从中请求数据的端点的名称不是 ,即/me/friends,请参见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>

解决方案

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

这篇关于Facebook错误:“(#100)尝试访问节点类型(User)上不存在的字段(user_friends)".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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