0
votes

I am trying to access my friend's list through Canvas using Javascript to get the birthday of the friend. I am reading the source documents and it states that friend's list object only pertains to those individuals that use the app.

Is it possible to get the friend list regardless of if the friend uses the app or not through a Canvas app?

I have tried setting the scope to 'read_friendlists' and changing the api parameter to 'me/friends' and 'me/friendlist'. The array that is returned in empty, and I assume this is because of the aforementioned restriction.

1

1 Answers

3
votes

As you already mentioned, in v2.0 of the Graph API you can only fetch the list of friends that also use the app.

Since v2.0, there is the endpoint /me/invitable_friends which is reserved for games that have a mobile and a canvas version. It simply returns a list of all friends that you can invite to play your game (thanks Cpt. Obvious). As of today there is no way to get a list of all friends of the user in v2.0 (unless they all use your app ;-)).

In case you are working on a game, you can check out the docs for the invitable_friends edge.