How could I fetch the friends of a friend of mine with FQL or something other of the FB-APIs?
At the normal website of Facebook it's possible to see the friends of a friend of mine
if I visit his profile and add ?sk=friends to the url.
According to the FQL docs on the friends table
the friends of friends cannot be retrieved.
When you try to access a friend's friends you'll get this message:
"Can only lookup for the logged in user
or the logged in user's friends
that are users of your app."
So you can only retrieve a friend's friends who have authorized your app.
Friends of friend can access only when one friend of your friend, your friend and you (loged user) use same app and give permission to access there data.
Related
I am able to get list of inviteable friends using this https://developers.facebook.com/docs/graph-api/reference/v2.2/user/invitable_friends.
But I am not getting ids of Facebook friends.
Or if it is not possible Can I get list of invited_friends?
I want to show friends as "invited" if user has invited them.
You get an invite token, not the ID of the users. The invite token is only valid for a short time, so you cannot use it to identify users later. There is no way to get a list of invited friends either.
In api v2.x, we cannot fetch the user frienda ids. In previous api version, we could fetch all fb friend ids. Invited friends ids was been saved on app server and filter that out from all friends to show invited icon. But in latest version this solution will not work, as there is no call available to fetch friends ids.
I want to select friends of friends of an user from Facebook. Is there an easy way to do it without searching for a friend list for every friend list of the actual user?
Not sure what you mean with "searching for a friend list for every friend", but what you want to achieve is not possible at all. You donĀ“t even get all friends anymore, only those who authorized your App too, with the user_friends permission. It is NOT possible to get friends of friends (second degree).
I am using Facebook Javascript sdk to get logged in user contacts {Name ,Email}
according to recent update in user_friends we can only get friends of the users who also uses the same app. so i am trying to get user taggable friends in taggable friends we can get user friends id and name but not friends Email. is there any posibility to get taggable friends Email Id from their Id
No, there isn't. All friends_* permissions have been removed. Taggable friends nodes do not contain the email address.
All friends_* permissions have been removed.
See
https://developers.facebook.com/docs/apps/changelog#v2_0_permissions
https://developers.facebook.com/docs/graph-api/reference/user-taggable-friend/
https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends/
Now my app is seeking the following permissions from user.
user_about_me,user_birthday,email, friends_about_me,friends_relationships
I'm getting the friends of the current logged in user and their relationship status. Is there any way to get the total count of FB friends for each one of them (i.e. No of FB friends my friends have) . I don't need the friends list but its enough to get the total no of FB friends a FB user have.
Is that possible? I know that if the user haven't authorized the app we couldn't find any information. But i guess the no of friends a FB user has may be a public data!!(unless he has privacy setting over them also)..
Is that possible using any FQL queries?
I have found a solution myself. Its possible to use the FQL to get the friends count.
There is a friend_count field against the user table.
SELECT uid, name, friend_count
FROM user
WHERE
uid IN
(SELECT uid2 FROM friend WHERE uid1=me())
The above query will retrieve all my friends with their names and their friend_count.
I am using the FB graph api to get a list of my friends' friends using:
https://graph.facebook.com/<id>/friends?access_token=<token>
Now the weird thing is that this works for some of my friends and does not work for some others. Could somebody tell me why this is happening and a possible fix?
In cases where it does not work, I get the following message:
"Can't lookup all friends of YYYYYY.
Can only lookup for the logged in user (XXXXX), or
friends of the logged in user with the appropriate permission"
And I repeat, I AM ABLE to get friend lists of some of my friends using the above URL.
What permissions are being mentioned here?
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.