我试着得到朋友朋友的名单。 由于他们已将我添加为朋友,因此我可以访问他们的朋友列表(朋友列表无论如何都可以公开访问)。
但是当我尝试通过API完成它时,我收到一个错误:
{"error":{"type":"OAuthException","message":"(#604) Can't lookup all friends of 100001150965395. Can only lookup for the logged in user (508424886), or friends of the logged in user with the appropriate permission"}}有没有其他方法可以查找列表(没有他特别授予应用程序的权限)?
我正在使用的代码是:
<? $a=$cookie['access_token']; $url='https://graph.facebook.com/100001150965395/friends?access_token='.$a; $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo $output;I am try to get a list of my friends' friend's. As they have added me as a friend, I am able to access their friends lists(friend lists are publicly accessible anyways).
but when I try to do it through the API, I get an error:
{"error":{"type":"OAuthException","message":"(#604) Can't lookup all friends of 100001150965395. Can only lookup for the logged in user (508424886), or friends of the logged in user with the appropriate permission"}}Is there any other way I can look up the list(without him specifically granting permission to the app)?
code that I am using is:
<? $a=$cookie['access_token']; $url='https://graph.facebook.com/100001150965395/friends?access_token='.$a; $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo $output;最满意答案
Facebook中有隐私设置,可以将朋友列表限制为仅限朋友。 由于您的应用不是您尝试访问的用户ID的朋友,因此您受到限制。 您可以通过在新的浏览器窗口(新会话)中尝试配置文件URL来检查它。 看起来有问题的用户ID无法访问好友列表。
http://www.facebook.com/profile.php?id=100001150965395
There is privacy setting in Facebook which can restrict Friends list to Friends alone. Since your app is not a Friend of the user id you are trying to access, you are restricted. You can check it by trying the profile URL in a new browser window (fresh session). It looks like the user id in question have prevented access to Friend's list.
http://www.facebook.com/profile.php?id=100001150965395
更多推荐
发布评论