facebook graph api..get friends of friends

萝らか妹 提交于 2019-11-30 09:01:13

Privacy permissions.

As a user, I control who can see my friends list. If I select "Friends only" then only my friends can see my list, not "friends of friends"

Log into facebook, on the upper right click on Account -> Privacy settings, then Click on "View Settings" under "Connecting on Facebook"

"See your friends list" is what controls this.

Edit: Sorry, had to think about that for a minute.

You can see your friend's friends via the standard Facebook web UI. Your app is not you. Even though you've granted the app access to your account, your friends have not. In that case, you're not going to get back your friend's friends unless they have it set to "Everyone". Your app is not a friend of a friend.

I believe that's the reason. The other reason could be that their API is renown for being buggy. You could always open a bug report on http://bugs.developers.facebook.net/ and if my supposition is correct, someone will let you know.

I got friends of friends(limited). I had same problem. Though it is very late for answering question, it will help somebody. That's why answering this question.

We can get friends of friends those are app users. Try by this fql query.

$fb_id= user id whose friends of friends required.

$query="SELECT uid, name, work_history  FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 IN (SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = $fb_id ) and is_app_user=1) )";
        $user_info=$facebook->api(array('method'=>'fql.query',
                    'query'=>$query));

Indeed. It's all http requests. But if I click on the link to show John's friends, facebook lists them, and if I use the graph api and a token, it doesn't. Either way it's me asking, but the api is inconsistent.

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