问题描述
我试图用新的Graph API做一个非常基本的事情。我已经知道如何让我的朋友:
..
但是,如果我有一个朋友的身份是123456,那么我想让他的朋友:
...
但我收到一个例外:
为什么我不能这样做?从API获得一个非常简单的任务。
如果我尝试获取一个随机用户的朋友,我得到HTTP 500但是它包含这个响应:
{
error:{
type:Exception ,
message:(#604)无法查找< UID> ;.的所有朋友。只能查找登录用户(< MY_UID>)或登录用户的朋友适当的许可
}
}
这是非常不言自明的。
如果我尝试让我的朋友的朋友允许查看他的其他朋友,它可以正常工作。如果我的朋友选择不允许查看他的其他朋友,我会收到相同的错误。
I am trying to do a very basic thing with the new Graph API.
I already know how to get my friends:"https://graph.facebook.com/me/friends?access_token=4333ed34d..."
But if I have a friend who's ID is 123456, then I want to get his friends :"https://graph.facebook.com/123456/friends?access_token=4333ed34d..."
But I get an exception:
Why can't I do that? It's a very trivial task to ask from the API.
If I try to get friends of a random user I get HTTP 500 but it contains this response:
{
"error": {
"type": "Exception",
"message": "(#604) Can't lookup all friends of <UID>. Can only lookup for the logged in user (<MY_UID>), or friends of the logged in user with the appropriate permission"
}
}
which is pretty self-explanatory.
If I try to get friends of my friend who allows viewing his other friends it works fine. If my friend chose to not allow viewing his other friends I get the same error.
这篇关于使用Graph API获取我的朋友的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!