Facebook SDK, fetching friends - ios

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.

Related

Is it possible to cross reference FB taggable_friends and local user records under API v2?

I am using Koala in a Rails app to get a user's friends for a simple tagging interface.
Some time back, Facebook changed the API (v2.0) such that this end point now returns a hashed ID, rather than the friend's FB ID. I've just started working with this endpoint for the first time since the change and am wondering, is it still possible to correlate an FB taggable_friends with a user of my app.
For example, within my app a user creates an event she attended, and now wants to tag friends she was with. The taggable_friends API allows taggings to be pushed to FB, but how do I also represent that tagging within my app?
The taggable_friends endpoint returns basic details such as name and avatar, so I could just store and display those. But if the friend is also a user of my app, and perhaps has a different avatar here, I'd like to display the details they have set in the app rather than FB details.
Is there any way to cross reference taggable_friends with local user records under the new API?
The tagging token is not valid forever, so you cannot cross-reference users. It would only be possible by name, but that is not reliable since users can change their name or two users can have the exact same one.
In other words: No, it is not possible.

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.

Getting full list of facebook friends through graph API

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.

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.

Is it possible for a Facebook page to access the ID's of every user who 'likes' that page using Facebook Connect for iOS?

I am making an app in Xcode which has users register via Facebook, their ID number is then stored in our database along with their device token so that we can send them push messages.
In order to have companies use the app, we would like them to be able to send messages to all registered users who also like their Facebook page. Obviously this means accessing a potentially huge list of IDs, but tbh I'm not sure this is even possible.
Presumably it's not done in the same way as accessing a profiles friends list as they are not friends (would they be fans? likes?). I can access a users friends list easily enough, but I would be appreciative if someone could point me in the right direction as to whether the same thing is possible for business pages.
Thank you.
Facebook doesn't allow access to userId's unless they specifically allow an app permission. This can be done via asking for any permission and a userId will be given.
In your other case you get around this because a user gives permission to access their friends list.

Resources