Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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.

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/

The functionality is available,the new facebook ios sdk has extended permissions where u can declare the Permissions to grant access while logging in by the user, when access granted we can access their Email ID,

like this,i have fetched ,

     _permissions =  [[NSArray arrayWithObjects: 
                  @"publish_stream",@"email", @"offline_access",nil] retain];
      NSString *emailUsr = [result objectForKey:@"email"];

Now you can get the Facebook User Email.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top