tags:

views:

950

answers:

3

Hi all,

How do I fetch the email of my friend programmatically in my facebook applicaiton. Does facebook provide this functionality,,?

Please shed some light on this...

Thanks

+1  A: 

I don't think you can do this via FQL. As an academic exercise you might need to use CURL and then have a CAPTCHA-parsing service

see also: http://www.25hoursaday.com/weblog/2007/08/21/FacebookTheSocialGraphRoachMotel.aspx

and

http://weblogs.mozillazine.org/gerv/archives/2007/09/facebook_imagetoemail.html

of course Christopher Finke's plug-in:

http://www.chrisfinke.com/2007/09/11/convert-facebook-e-mail-images-to-actual-e-mail-links/

pageman
Using cURL and CAPTCHA parsing to get around this restriction would likely get your app banned eventually.
ceejayoz
It wouldn't work anyway, as there is no way to even determine what a user's email address might be.
zombat
@ceejayoz that's why I mentioned that it's an academix exerices ;)@zombat I think fb stores the emails in an image file, so if you can get that file and have it parsed (am assuming that the fb CAPTCHA has been broken) :P
pageman
+3  A: 

edit: This changed with the newer Graph API's permissions system. Users now have the option to use the proxymail address, but it appears to reveal the true e-mail by default.

Facebook's API calls do not reveal users' e-mail addresses, ever.

Even when a user specifically grants you permission to e-mail them, it's a proxied e-mail address that doesn't reveal their true address - something like apps+###########.#########.######################@proxymail.facebook.com.

See http://wiki.developers.facebook.com/index.php/Proxied_Email for details.

ceejayoz
great piece of information. thanks a lot.
Gaurav Sharma
+6  A: 

The answer is no, Facebook does not provide this functionality. Facebook tries to protect the privacy of its users, and therefore user email addresses are explicitly not available.

The only way to email a user is to prompt them to grant you extended email permissions via a Facebook prompt. If they grant you the permission, you can then use the notifications.sendEmail API method, or query the user table for the proxied_email field, and send them an email via Facebook's Email Proxy system.

zombat
thank you sir. :-)
Gaurav Sharma

related questions