1

I have a problem regarding fetching emails of friends when a person has signed up to my site using his facebook account.

  • I am trying to fetch the email id (email or contact_email or proxied email) from the User table using FQL..but I get all null values in it.

This is my Fql query-

/fql?q=SELECT+uid+,+ name+,+ pic_square+,+affiliations+,+birthday_date+,+sex+,+relationship_status+,+current_location+,+education_history+,+work_history+,+contact_email+ FROM+ user+ WHERE+(sex='female')+AND+uid+ IN +(SELECT+ uid2+ FROM +friend+ WHERE+ uid1=me())

Now when I am not able to fetch the email ids ,I am not able to send invitations to them automatically .

Give me some suggestions

PS I don't want to send personal messages or post on the facebook walls.

Basic
  • 26,321
  • 24
  • 115
  • 201
Aviral Kumar
  • 814
  • 1
  • 15
  • 40
  • 1st: please expand a bit what do you mean by "but no success" 2nd: please post your whole FQL query – thermz Feb 17 '12 at 18:03

1 Answers1

2

I don't think that you can do that.

If you look at the official documentation for the permissions: http://developers.facebook.com/docs/reference/api/permissions/ and look for the "email" permission which you need the user to grant you in order to get his email, next to it in the "Friends permission" column you'll see "N/A".

That should tell you that you can not get the e-mail address of the friends, and that's a good thing that facebook are not providing.

EDIT

You can also check out this thread: Facebook friends email FQL

Community
  • 1
  • 1
Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299
  • Agreed, if this was possible, there'd be huge privacy concerns. – MysticXG Feb 17 '12 at 18:06
  • I actually have a site in view which fetches the email ids. I am trying to implement it. Its important for me to have email ids. – Aviral Kumar Feb 17 '12 at 18:11
  • I find that hard to believe, since as @MysticXG wrote something like that would "be huge privacy concerns". But if you know of such a site, can you please give it as an example? – Nitzan Tomer Feb 17 '12 at 18:14
  • Nitzan- I am making a site in which you get connected with the friends of friends. suppose user A and user B logs in my site . User A wants to get connected to a friend user C of user B. Now I want to send a email to User C as an invite to join the site and connect with user A. – Aviral Kumar Feb 17 '12 at 18:19
  • I am not sure whether I should name the site or not. Work issues – Aviral Kumar Feb 17 '12 at 18:20
  • Well, facebook won't let you get the e-mail of user C, and I'm glad that's how it is. The only exception being that user C also uses your site and then you can get his email when he signs in (if you ask for the email permission that is). Another approach you can take is to use the "send Dialog": http://developers.facebook.com/docs/reference/dialogs/send/ which has the "to" parameter, I'm not sure that it will work if A tried to open the dialog and send to C if they are not friends, but you are welcome to give it a go and try – Nitzan Tomer Feb 17 '12 at 18:23
  • Thanks for the input but i tried the send button also. But its of no use because of the reason you specified. Can i do something else?? – Aviral Kumar Feb 17 '12 at 18:25
  • If that does not work then as I see it, no, you can't make A and C communicate. You'll need both of them to at least use your application, and then you have everything you need. – Nitzan Tomer Feb 17 '12 at 18:27