views:

66

answers:

1

I am developing an ASP.NET application. I implemented Facebook API in my application now I want to access email addresses of my friends on Facebook.

I successfully connected Facebook with my application, but when I use FacebookApi.friends.GetList() it will give only friends userids then I will fire a FQL for each friend userid to access email but some time I got blank instead of email address.

Can someone help. Which is best way facebook rest API or graph API?

+3  A: 

The answer is almost certainly that one of the following is true:

  • The user hasn't shared an email address with Facebook
  • The user has placed you in a privacy group they deign to share their email address with
  • The user has set their privacy settings to not share their email address at all

If any of these are true, there's nothing you can do to resolve this short of asking your friends to change their privacy settings.

Rob
but i am fire FQL based on userid,
Vasim Parvez
similar to: select email,name from user where userid=230128328
Vasim Parvez
@Vasim, and if the userid you specify has privacy settings that are set to **not share** their email address, you will have it returned blank. There's no way (and if there is, it's a bug that Facebook will eventually fix!) to circumvent a users privacy settings, irrespective of how you're obtaining the data.
Rob