This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Graph API - get the Friends of my friend
assuming my facebook app has permission to access user' friends details,
what is the fql query to get list of user' friends of friends?
if not fql, is there any way to get it with graph api?
No, there is no way to get friends of friends. Your access token only allows you access your friends data, not your friends friends date which includes who they are friends with.
Related
What does Invitable Friends API and Taggable Friends API return?
Do they return all the friends (both users and non-users of my app) of a user?
If it returns all users, Can I use these APIs to retrieve other detailed information of the friends like Birthdays?
They return all users, but you only get an invite or tagging token and the name, nothing else. You can only retrieve the birthday of a friend if that friend has authorized your App with the user_birthday permission. Else, that permission would not make any sense ;)
Remember, the Invitable Friends API is for inviting friends to a game with Canvas implementation only - and the Taggable Friends API is for tagging friends only.
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?
In new SDK of the Graph API is not possible to do that.
Take a look here.
This question already has answers here:
Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application
(8 answers)
Closed 3 years ago.
Im using facebook graph api to login to facebook and get all my friends names and ids, but im just getting those friends who are also using my app.
I want the list of all my existing friends whether or not using my app.
Please help!!
In v2.0 of the Graph API, calling /me/friends returns the person's friends who also use the app.
In addition, in v2.0, you must request the user_friends permission from each user. user_friends is no longer included by default in every login. Each user must grant the user_friends permission in order to appear in the response to /me/friends. See the Facebook upgrade guide for more detailed information, or review the summary below.
If you want to access a list of non-app-using friends, there are two options:
If you want to let your people tag their friends in stories that they publish to Facebook using your App, you can use the /me/taggable_friends API. Use of this endpoint requires review by Facebook and should only be used for the case where you're rendering a list of friends in order to let the user tag them in a post.
If your App is a Game AND your Game supports Facebook Canvas, you can use the /me/invitable_friends endpoint in order to render a custom invite dialog, then pass the tokens returned by this API to the standard Requests Dialog.
In other cases, apps are no longer able to retrieve the full list of a user's friends (only those friends who have specifically authorized your app using the user_friends permission). This has been confirmed by Facebook as 'by design'.
For apps wanting allow people to invite friends to use an app, you can still use the Send Dialog on Web or the new Message Dialog on iOS and Android.
This question already has answers here:
Get a list of friends of a friend on Facebook
(6 answers)
Closed 9 years ago.
I was trying to understand permissions around friends list using graph api explorer.
If there is a user whose friends list is public and the user is not in my friends list nor do I have any mutual friends with that person - i can still see friends of that person on Facebook which tells me that their friends list is public. But when I use graph api explorer to do the same for that user I see the following exception:
{
"error": {
"message": "Unsupported operation",
"type": "FacebookApiException",
"code": 100
}
}
Does someone know why that is?
Also, another related question is - even if I can see my friend's friends on Facebook, I cant see that via graph api explorer because for graph api to show it my friends should have made their friends list public, is that correct?
Thanks.
The Graph API only allows you to see friends of the authenticated user. This is correct way as it's saying
I (the authenticated user) am granting you (the application) access to see my friends
So friends of friends, non-mutual and so on are not allowed.
I know that using friends_work_history permission, we can access friend's work history. Now, I have 150 friends and out of these 150 friends, 45 friends authorized the app.
Because of this, I have work history of those 45 friends' friends.
Now, I need count of total unique employers of your friends AND your friends' friends who have authorized the facebook app.
Neither FQL nor the Graph API has a count method. You'll need to take the results from your query and count these using another programming language.