How to display a list of Facebook users registered with my Facebook Connect website

Tag: facebook Author: woyaozc Date: 2009-07-21

I'm developing a website using Facebook Connect as the only membership/authentication mechanism. So far authentication and inviting friends work.

Now I'd like to display a list of users registered with my Facebook application. Something like : "There are 1234 members in the AppName community" + a list of profile pictures.

How would I do that ?

Thanks !

Best Answer

This is actually pretty easy to do. After each user connects with your site through Facebook Connect, create an entry for them in some user table (which you're probably already doing). Then when a user logs in simply display the total number from your users table and randomly select 10 user IDs (or whatever number of pictures you want to display) and show them using the FBML <fb:profile_pic> tag http://wiki.developers.facebook.com/index.php/Fb%3Aprofile-pic.

comments:

This is pretty much what we did. But I wish there was a way to do it without storing anything on our side. Something like "Hey Facebook, give me the number of people who are members of our app and send me some profile pictures as well".

Other Answer1

There is some metric information available about your application via the Admin.getMetrics API call. I believe it only provides the number of active users within a certain time period however.

The actual total number of users is difficult to track due to people who remove the application, or might have it installed but blocked. I don't think it's available as a specific property anywhere. The information pages about Facebook apps never show the total number of users, only the monthly active users, which is what Admin.getMetrics() can tell you.

comments:

You're right. There doesn't seem to be a way to get the users using the application. However it seems I can get the users who are 'fan' of the page about my the Facebook application... Not tried yet.
I would really like to hear a response to this as well!