how to identify an invitable friend after he authenticates a app - facebook

According to https://developers.facebook.com/docs/games/requests/v2.4#invites
, I can get recipient ID of those invitable friends by the api below:
http://graph.facebook.com/<REQUEST_OBJECT_ID>_<USER_ID>?access_token=APP_ACCESS_TOKEN
(For an invitable friend we only get an request id for each friend like AVmdFg56QlT-FpSbrAFheEa9aY4d-kFz6uyAIxlt... instead of his actual user id)
But I found the recipient ID I get is different from the actual user id. (I compare them after the user authenticates my app.)
My application needs to track those invitable friends in an "activity" object, then when an invitable friend actually authenticate the application, I can add him to the activity that invites him. I want to identify these invitable friends by their ID, since the id is different, so it seems this doesn't work.
Is there any other way to get actually user id? or maybe I should identify them in another way.
The current workaround I come out is identifying them with REQUEST_OBJECT_ID.

Related

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.

Multiple Facebook IDs for the same user

i'm crawling user comments and its user ids in public links to build a graph, and i noticed some users have more than one ID. For example, this user have two different IDs: 100000571429851 and 993673107328394.
I'm not using different aps to get the user ids (someone told me user IDs changes between different apps).
Any ideas about how i can get a really unique ID for each user?
The reason for the different IDs is because this user is using a mixture of v1 and v2 facebook apps. The first ID is the user's personal ID and is returned when someone authorizes the v1 of an app. The second ID is an app scoped-ID and is returned using v2 of the facebook API. See the section in the facebook docs on App-scoped User IDs
https://developers.facebook.com/docs/apps/upgrading
Facebook will begin to issue app-scoped user IDs when people first log into an instance of your app coded against v2.0 of the API. With app-scoped IDs, the ID for the same user will be different between apps.

Facebook app scope id to taggable friends id relation

I wish to use the API like below:
Invite friends who are not on my app from through taggable friends API by tagging them in some stories
Once they sign up, show them the stories they were tagged in.
Now the problem is taggable friends id returns id that can only be used for tagging. So when I save tagged stories for that user against that id and when the user logs in, there is no way to match the stories to that user. Can anyone suggest a solution to this problem? In other words, is there a way to get app scoped id from tagged user id?
There is no way to get any ID from the tagged token. In addition you should not be using taggable friends as a method to invite friends, this will not be approved in Facebook Review.
So, there is no solution to this problem because everything here points in the direction of violating Developer policy.

Can you lookup friends of friends with the Facebook graph API?

My app needs to generate a list of friends for the logged in user, as well as the friends of the friends. The logged in user has authorized the app. So I have no trouble getting their friends. When I make the /friends/ call to the API using one of the friends' IDs, I get this error message:
Can't lookup all friends of [FB ID]. Can only lookup for the logged in user or the logged in user's friends that are users of your app.
I knew that the public visibility of one's friends is a configurable setting for each individual user, but if I understand this message correctly it means that you simply cannot do what I'm trying... ever.
Question #1: Is this true? Is there simply no way to lookup someone's friends' friends?
Question #2: If it's not possible, how do sites like Glassdoor.com manage this exact functionality?
You cannot get the friends of friends of the person who is using the app.
Glassdoor.com sends invitations to the user's friends and when someone accepts, they simply get his friends since he becomes a user of their app.

Can I use an app user's friend public data (id, name, gender) in other app users app context

I am developing an app in which I want a user (Alice) to send a list of few of her friends to one of her other friends (Bob). Bob is not a friend of the people on Alice's list.
The list that will be displayed to Bob will contain only public data that can be queried from facebook by the ids of the friends on the list. Meaning, I will only save the ids of the friends.
Is what I'm planning in accordance with the Platform Policies? and particularly with sections 2.4:
A user's friends' data can only be used in the context of the user's experience on your application.
and 2.11:
You cannot use a user’s friend list outside of your application, even if a user consents to such use, but you can use connections between users who have both connected to your application.
If you provide that information inside your app context I see no problem... Meaning If in your app you sugest the Alice Friends to Bob you'r OK.
It's been done time and time again...
Seems like you may be looking for Facebook's friend suggest dialog, which is part of their API. Facebook will suggest and send a friend request on your behalf.
https://developers.facebook.com/docs/reference/dialogs/friends/