views:

51

answers:

1

I'm trying to get a user's facebook profile picture based on their email address. Effectively, I want to offer my users the option between using Gravatar for their image, or Facebook. However, the only way I know of to get a user's facebook image is via:

http://graph.facebook.com/[FBOOK USERNAME]/picture?type=large

Since the usernames may vary between facebook and my site, I would like to do this via email address rather than username. How do I query for someone's facebook profile picture via email address?

A: 

What you're asking to do is part of why Facebook Connect exists.

Using their not-too-cleverly-named XFBML you can request the image directly: <fb:profile-pic uid="1256100362" facebook-logo="true" size="thumb"> </fb:profile-pic>

But you have to implement logins with FB Connect first...

Nilloc
this still uses the UID though - you can already do that without Facebook Connect via, in the case you mentioned, http://graph.facebook.com/1256100362/picture?type=large
Mala