I am trying to make an app that shows the user their top 10 friends on facebook.
I've researched a lot of solutions on stackoverflow but they were all posted a few years ago and now do not work with the new restrictions imposed by the v2+ Api.
How would you propose ordering the users friends list to show the most likely top friends. (Friends of the user do not have the app installed)
You can only access friends who authorized your App too. More information: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
Related
I searched the internet the whole day for this, and came to the conclusion that there is no way to get a user's full friend list since API 2.0 (correct me if I am wrong).
What I want to do is, given the app user and another facebook user, generate a report about their "second level" mutual friends. That is - (friends of mine) who are friends with (a friend of his). Illustration:
Is this kind of thing possible after facebook's restriction since API 2.0 in any platform (Different SDKs, Facebook's Graph API, etc)?
Many Thanks.
This would be the API: https://developers.facebook.com/docs/graph-api/reference/user-context/all_mutual_friends
There is no way to get friends (or users in general) who did not authorize your App. Every list you get will only include users who authorized your App.
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 have seen many apps like Tinder and many other apps gets friends lists from facebook. When i login to these app they import all my friends list and sotre to their database. According to facebook doc it says only taggable friends are available through api which should be used to tag on user posts. But Tinder and other apps do not tag friends in the post. So I m curious to know how they get facebook friends.
/me/friends gets all friends who authorized the App with user_friends too, so they most likely used Tinder already.
The answer in this thread explains everything you need to know: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
I'm trying to get logged user friends list, through Facebook Login with accepted permissions. As i understand it returns only those users who are accepted permission of the same app.
But, when i'm just opening https://developers.facebook.com/tools/explorer/ , choosing "Graph API explorer" and entering -> /me/friends i get just three random friends. Why is it so?
Can someone help to understand how to get all friends of a logged user throug facebook login? Or it's not possible anymore?
Thanks
It's all in the docs at https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids, and there are multiple questions/answers about the same topic during the last days available via the search of Stackoverflow, e.g. retrieve full list of friends using facebook API
If you are using Facebook API v2.0 /me/friends will only return friends that are using the app and not all friends. And there is nothing you can do to get all friends
If you created your app after 4/30/2014 you have to use v2.0.
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 8 years ago.
new 2.0 version has a paging that limit the numbers of friends at one request, which doesn't allow me to retrieve all friends at once although there's a parameter call 'limit', it can only be done by looping the 'offset' till the end. The problem is each user has different number of friends!
I've been looking around for few hours but still don't have a solution..
As mentioned in the Graph API v2.0 upgrading guide (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.
After a person has logged in with v2.0 of Facebook Login, calling
/v1.0/me/friends and/v2.0/me/friends` will both result in the v2.0
behaviour - both calls will return the set of the person's friends who
also use the app.
So, in v2.0 you'll only be able to get all friends via the /me/taggable_friends (https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends) endpoint, which only contains the fields id, name, picture, and only can be used after a review of your app by Facebook.