is there any way to fetch list of friends using facebook 2.0 API?
I was reading this upgrade from the API and it seems it is quite difficult to fetch the friends now,
but I have seen 2 permissions
read_friendlist
user_friends
Is their any way to fetch list of friends? and what about the widgets that get friends from facebook, will they go down?
In v2.0 of the Graph API /me/friends returns the user's friends who also use the app. You need to be granted the user_friends permission in order to get even app-using friends.
There is no way in v2.0 to get the full user's friends.
However, you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API or the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends APIs to get all the user's friends with tokens than can be used for tagging and inviting.
the read_friendlist perm doesn't get you a list of the user's friends, it gets you the list of a user's friendlists which may be used to build a custom privacy selector when publishing stories to Facebook.
As of 4/30/2014, you can only retrieve the friends who also use the app.
There are, however, specific methods for apps in the 'Game' category for inviting friends.
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/
Related
I would like to get all the posts and updates that are normally displayed in FB official application for MY account (this includes updates from my friends and liked pages).
I wasn't able to find any details how to get that, the only thing I've managed to get is my own posts.
Anyone got any experience with that using current Graph API verion (3.3)?
All the alternate FB clients (ex. Friendly) must be doing this somehow.
There is no way to get ANY data of users who did not authorized your App. Which means, there is no way to get posts of friends. You can only get your own friends, with the user_posts permission and the /me/posts endpoint. If some Apps access friend data without their authorization, they are most likely doing something that is not allowed.
Here is what I found in their API docs:
There are two scopes:
The user feed requires the user's permission
The public feed has fewer capabilities but doesn't require perms
I am working with facebook graph and I believe that Facebook graph doesn't give access to users friends list but only total friends count is given on graph request in any of the present graph versions (2.0-2.7).
But this app has got over that restriction and it gets users friends list on oauth version 2.3 How did they got that ?
Facebook App with friends list resource available(meaww.com)
Did facebook made any exception for them or did I missed something ?
I would not authorize those spam apps, just to be safe. Anyway, i assume they are using taggable_friends or invitable_friends - i am pretty sure they shouldn´t though. There is more information in this thread: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
I'm developing an app which is super important to get the user's friends.
I just need to get a list of friends (Avatar and name) I do not require any more information or want to do anything with that data, you simply get a list of friends.
With the new change in Facebook it is impossible?
Regards!
See point 3.) of
https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
/me/friends returns the user's friends who are also using your app
In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.
There are two key use cases where apps need access to non-app friends: tagging and inviting. In v2.0, we've added the Taggable Friends API and the Invitable Friends API to support these flows.
I was reading up on here:
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/friends?locale=en_GB that the user_friends permission can only return a list of friends who also use the app. All I am trying to do is get all of a users friends' profile pictures. Is there some workaround to this in swift?
In combination with getting a list of friends who use the app, you can also get a list of the "invitable friends." These are the user's friends who have not allowed the app.
Here is a link to the documentation
https://developers.facebook.com/docs/games/invitable-friends/v2.2?locale=en_GB
Any chance the 'me/friends' graph api or friends FQL table return some friends only?
I've checked the results and it's slightly less than the count I see on facebook.com
In Graph API V1.0
A call to /friends on a User object (e.g. /me/friends) or a query of the friend FQL table should return all friends of that user except
Those who have deactivated their accounts
Those who have blocked your app
Those who have disabled all Platform apps from accessing their data. - If a user enables this option (see below) you can't access any information about that user via the API, including their basic info, posts they make, etc. They won't appear in the friends list of your app's user via the API.
If you find friends are missing from the response it's almost certainly for one of those reasons, and in my experience most people asking this question are asking about the third case.
The option to remove platform option is currently under Privacy Settings -> Ads, Apps & Websites -> 'Turn off your ability to use apps, plugins, and websites on and off Facebook
If you're not getting all friends in a single call and you're sure it's not because of one of those reasons, check if you have a limit parameter in your query - and increase it if it's less than the number of friends you think should be appearing.
e.g. /me/friends?limit=5000 for the maximum number of friends allowed, 5000
Note that the friends count will include users which can't be retrieved in the list (e.g. the friend_count field of the User FQL table)
In Graph API V2.0 or higher
A call to /friends on a User object will, if the user has granted your app the user_friends permission, return the friends of that user who have also granted your app the user_friends permission -
You can read more about the change from v1.0 to v2.0 in Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app or on Facebook's changelog
You need to pass a limit parameter.
'me/friends/?limit=0' it will return all your friends.
UPDATE
the parameter limit=0 returns 0 friends,
to get all your friends, you need to set the limit=5000 (it's the max number allowed)
With the introduction of the Facebook Graph API 2.0, access a user's friends list was removed and limited to just friends who use the same application. However, Facebook added two new APIs to allow retrieval of Friend names (and indirectly a friend count). The two new APIs are taggable_friends and invitable_friends.
Url:
me/taggable_friends?limit=1&fields=id,name,