tags:

views:

57

answers:

1

Hi all, I want to get a list of all users (even if they are my friends or not) who are using my facebook application. Is this possible? If so, how?

And another quick question if we're still here :) Assue I have a facebook id of a person, can I retrieve his name by using it?

Thank you!

+1  A: 

I don't believe that you can get a list of all the Facebook IDs of users of a particular application. There doesn't appear to be a possible query for this based on an examination of the FQL tables, probably due to performance and privacy reasons. Generally the presumption is that you maintain a local list of users in your own application, and correlate them to Facebook via their ID, so you would already have all these IDs.

To answer your second question though, yes, that is definitely possible. The Facebook API provides both the users.getStandardInfo and the users.getInfo methods, both of which take user Ids and return information about the user, including the name. users.getInfo can even be used without a session key to just get the name of the user.

zombat
Just want to add that for some users you won't get their name depending on their privacy settings if you don't have a valid sessionkey for them (either from them interacting with your app currently, or an infinite/offline_access session key). I think if they have opted out of the Facebook search listing then you can't get their name unless you have a valid current sessionkey.
Pat James

related questions