Getting full list of facebook friends through graph API - ios

I have IOS app for that login is through Facebook, For some feature I need full list of friends.
With current version of Graph API calling "me/friends" only returns person's friends who also use the app.
So now getting full friends list not at all possible or is there any way to get full list.
Also I need to invite my friends to use the app.
Note: App is not a Game app.
Thanks in Advance.

Despite what the earlier comments on this question might tell you, this is 100% possible with the me/taggable friends endpoint in Graph v2.0.
However there are three things worth noting:
Facebook is strict on the usage of this endpoint, so you'll need to get your use of it approved by the review team.
Taggable friends can only be used in the context of "friends you're about to tag on Facebook.com". This endpoint cannot be used for any other purpose.
When you query me/taggable_friends, the id returned for each user is NOT their Facebook id. It is a short-lived token that can be passed via the API to instruct Facebook to tag that user.

Related

Mutual friends of two users who are not friends on facebook using Parse and Facebook SDK

I am using the latest Parse SDK 1.7.1 and Facebook SDK 4.0.1 on my iOS application. My users can only log in using their facebook account.
A very important feature I need, is showing the number of facebook friends user1 has in common with another user2 (who is probably not friends with user1 on facebook). Let us assume for the following that I do get the user_friends permission from both users.
My first question concerns the following quote from the Graph API docs:
Additionally, the response will only include any mutual friends who
have granted user_friends to the app.
Does this mean that user1 will only see mutual friends that also use my app? Is it possible to just retrieve the number of mutual friends, without the actual list of friends?
My next question concerns the following statement in the Graph API docs:
If you want to call this endpoint on behalf two app-users who are not
friends, then you must provide the appsecret_proof parameter along
with the user access token when making the request. This means you
must call this endpoint from your server.
How does this work together with Parse? Would I need to do this in Cloud-Code? If so, does anyone happen to have some example code for me of how to do a Graph API request from Cloud-Code? I am not familiar with Cloud-Code yet.
Thank you very much in advance for your help, it is very much appreciated!

Is it possible to retrieve the _whole_ friendlist of a user using the iOS Facebook SDK?

I am reading through the docs and other questions on Stackoverflow. Am I getting this right that it is actually impossible to retrieve the whole friendlist of the user? The permissions user_friends only refers to friends that have previously logged into the same app with Facebook.
I am wondering if I just oversee the solution or if it is indeed impossible to get access to a user's friends because there is no API that would allow to do so?
Since graph API v2.0, this is no longer possible:
See
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends#readperms
This will only return any friends who have used (via Facebook Login) the app making the request.
https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
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.
As Tobi says, in V2.0 this is no longer possible.
But, if you want to get only name and profile picture, then its possible!
Check taggable_friends
Note that The id that returns this API call isn't unique, it may change for every request for same user, so you can't use that field to identify user, you can use it ONLY for tagging.

Facebook SDK, fetching friends

I am currently building an app, and I need to fetch all the friends of a user, in order to display them to that specific user (public picture + name).
I have tried to implement the taggable_friend into my app in order to do so, but Facebook is not giving me the permission to use it as they say it should only be used to tag friends in stories.
Also, my question is, how apps like "Tinder" and "Hot or Not" do to get access to my entire friend list (even the one not using the app)?
And in the case of "Hot or Not", they even display my friends not using the app so that if I like them, I can invite them to join.
In the v2.0 release on the Facebook Graph API, the ability to access a person's friends was changed in two ways. The first was via a new permission:
Friend list is no longer part of the default permission set and has
its own permission: Asking for access to a person's friend list is now
a separate permission that your app must request. The new permission
is called user_friends.
The second affected which people are returned when requesting the list of friends:
Friend list now only returns friends who also use your app: The list
of friends returned via the /me/friends endpoint is now limited to the
list of friends that have authorized your app.
You can find more information here:
https://developers.facebook.com/docs/apps/changelog#v2_0
I tested a lot Facebook API this year, and Facebook won't let you see your friends, for security matters, they only let you see the ones registered in the same app. If you are seeing the ones that are not, probably Tinder or whatever app is not using the latest version, v1.0 i guess, that will expire on April 30th, 2015.

Facebook IOS Sdk find all friends ids

I'm looking for doing a tableview which allow you to select one facebook friends and be able to send him a message to his wall later. The thing is that i tried /me/friends but it returns only the friends which use the same app...and it's not really usefull then.
I also tried /me/taggable_friends but it returns me an id for tag the friend and doesn't work for sending a message...
The last one i didn't try is /me/invitable_friends since it's not a game...but i guess it's also using an id only for invitation...
So is there a way to get the list of all the friends of facebook and get there ids ?
thanks !
That isn't supported anymore. There doesn't appear to be a simple way to grab all of a user's friends. You could use /user/invitablefriends, but that comes with a whole host of caveats. From the docs:
A list of friends that can be invited to install a Facebook game.
The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. This API is not available in v1.0. It may be called by mobile games as long as they also have a Canvas presence.
The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. This API is not available in v1.0. It may be called by mobile games as long as they also have a Canvas presence.
Since Graph API v2.0, /me/friends returns a person's friends who also use the app. You may use the Requests Dialog to invite people to play a game. However, if you want to build a custom multi-friend selector within your game, you need to use call /me/invitable_friends which returns a ranked list of a person's friends who do not play the game, along with a token which can be passed to the Request Dialog in order to invite them. Read our guide on using the Invitable Friends API.
Additionally, posting to another user's wall cannot be done through the Facebook SDK anymore. You can post to your own wall and you can tag other users, but you can't post directly to their wall anymore.

Use paging in facebook api

I have been trying to fetch the list of friends. The sample code with IOS facebook SDK gives all the friends i currently have but when i try to fetch list manually using graph api . I get only a few. Then i read under permissions "This will only return any friends who have used (via Facebook Login) the app making the request." My questions is
1. how come sample IOS facebook code can fetch all the friends and when i make graph api call i get only few. The call i am using "me/friends" ?.
Will it be possible to get friends ids or emails?
As of 4/30/2014, you can only access the friends who also use the app, and you have to explicitly ask for the user_friends permission to even get that.

Resources