Facebook count friends - facebook

I have a problem with Facebook API.
I need to get total number of users friends.
/me/friends
returns only friends that are using app even if I have permission user_friends.
How can I get only number of users friends, nothing more, no need to get their id, mail etc. just total nu,ber of user's friends.

If you are using API v2.0 you can not get all friends. And if you created your app after 4/30/2014 you have to use API v2.0.

Related

How does this facebook app got user's friends list through oauth

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

Facebook get invited friends id

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.

Get Facebook Friendlist (only read)

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.

Facebook Graph Api: trying to get logged user all friends list is failed

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.

fetching list of friends using facebook 2.0

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/