Facebook API v2.0 introduced the invitable_friends
edge.
An example response from a GET request to this edge is:
{
"data": [
{
"id": "AVkgK9fLFxasdvXNbDV_gYogR6lXa9SKLnH...",
"name": "Anita Sujarit",
"picture": {
"data": {
"is_silhouette": false,
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t1.0-1/c0.0.50.50/p50x50/1470158_10201991701127909_302023572_t.jpg"
}
}
}
}
Looking closely at that ID, it's not a normal Facebook user id. Instead it's an Invite Token; this token is passed to the Requests Dialog as a value for the to
parameter.
The invite token, returned on each of the friend objects as the value of a field named id, is a unique (per user and per game) string of variable length. The invite token is subject to expiration, and may change between game sessions. It is therefore not advisable to cache these results, or to try to assign them to a given person.
The friends
edge now only returns friends already using the app
My problem is that I now have no way to cross-reference which friends I have invited and which have accepted.
Previously, I would have stored a friends id as I sent them an invite, and, at some later point, checked this against a list of friends playing the game, but now this isn't possible for several reasons:
- The invite token isn't present on the friends edge
- And it's dynamic anyway
- The normal user id isn't present on the invitable_friends edge.
- I could use the user's name as a key, but this isn't unique.
Actual Question: Has anybody devised a way of determining, from users that have been invited, which have accepted that invite please?