Skip to content Skip to sidebar Skip to footer

Getting List Of Friends Using The Same Application In Facebook Using Javascript Sdk

I am extremely new to Facebook API codings and am trying to make a game application where users will be able to see who (in their friend list) is already using the game application

Solution 1:

Anytime a user uses your game, make sure their user id is in your database, in your users database table for example.

Then, anytime you need to generate the list of the current user's friends who play the game, grab the list of the current user's friends -- see /me/friends -- and check if any of the returned ids are in your users table.

Solution 2:

You don't have to maintain a separate database if you store a starting score or an achievement for each users. To find friends' Games information, simply get .../me/friends for the current User, and then loop through each friend ID returned and query .../FRIEND_ID/scores or .../FRIEND_ID/achievements using the User's access_token.

Post a Comment for "Getting List Of Friends Using The Same Application In Facebook Using Javascript Sdk"