views:

94

answers:

1

On a Facebook application (working under appengine) I need to tell the user which of his friends are already using the application.

When a user uses a Facebook application, Facebook handles the user's friend list to the application. This list might have up to 5000 friends, so checking them one by one might be too slow.

What's the best way to do an intersection between this friends list and other list, for example, the list of all the users this application already has?

Thanks,

+2  A: 

You don't have to handle that yourself. There's an API call for it: Friends.getAppUsers

Most API libraries should support it and it'll definitely be lower cost than trying to manage the problem by hand. Also, Facebook will want you to use the very latest information instead of cacheing it.

Richard Watson
Great! I was looking for that, but couldn't find it.
Fh