How to get a facebook user's friends emails - facebook

Good Evening, i'm just asking how to get a user's friends emails using face book API or something else, the scenario i want to use this feature in goes as follows, my application has a feature called 'import facebook friends' that will do the following:
- verifies that this user has a valid facebook account
- asks him for his facebook identifier(email)
- from his identifier get all his friends and get everyone's email
i don't know if there's any API that performs this functionality?

You can get almost all details about friends like their photos,interests, status updates but not email address.
From Facebook Email Permission Page : "Note: There is no way for apps to obtain email addresses for a user's friends."

To get a user's email address, you need the user_email permission. However, there is no equivalent friends_email permission to get Friends' email addresses as Facebook doesn't allow applications to get these.
Instead, you the Facebook User ID to link friends together. That is the correct way to do things, since the email address can change anyway.

Related

No Facebook Friend's email address are returned by using Graph API

I am going to retrieve Facebook friends email addresses in one of my applications. I have asked the permission for "user_friends" and "email" apart from other permissions, but when I try to get the email addresses for my friends list, email address is not returning. I could able to get other information but not email address. I tested the same using Graph API tool, it is also giving the same result.
Can anyone suggest what was the issue in getting facebook friend's email addresses?
There is no way of getting friends' email addresses. The email permission is used to get the user's email address, and user_friends permission is to find friends who also uses the same application.
The reason both your app and the Graph API doesn't return email addresses is because it's not possible (for obvious reasons, like spamming). There is no way around this.
If you want to invite friends to use your application, use one of the other methods like Sharing, Requests or Tagging.

How to get all email id's of friends which are in friendsList from facebook

I am new to iphone.my question is How to get all email id's of friends which are in friendsList from facebook while using Graph API in iPhone? I am able to get all the pictures,name,first name and last name of the friends which are in friends list except the email id's how can we do this If any body know this please help me.IF any body provide some code for this it will be helpful for me....
You can't, e-mail addresses aren't available via API for friends due to privacy risks.
See the facebook Permissions Reference.
It is simply not possible to get the email addresses of Facebook users other than the user of your app (ie. the person who authorizes your app and for whom you get an access_token), not even Friends of the user. Even extended permissions won’t help here.

Fetching email id of the of facebook friends

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.
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

Get friend name using email

There is a "send to a friend" form, which is used to send HTML emails to friends. The user is connected using Facebook Graph, I can ask for any permissions.
I want to get friend's name (if the friend is Facebook-friend) using Facebook API. I figure, if I have emails address, is it possible?
it's very easy to do this, and you don't need the e-mail address.
once the user authorized your application, even with out asking for any other permissions, you should be able to access the users friends list, as you can see here:
http://developers.facebook.com/docs/reference/api/user/
(under the Connections sections, there's the friends collection http://developers.facebook.com/docs/reference/api/user/#friends)
you can try to see the result here:
http://developers.facebook.com/tools/explorer/?method=GET&path=me/friends
as you can see, the name of the users is present and you can use it.
hope this helps.

Fetching Friend contact details from the user's Facebook account?

I had used the 'friend.get' api method to get the friends id and from id i am trying to fetch the friends details can not get the friend contact detail in it. So please let me know if you have any solution for the same.
You cannot get a user's friends' contact info using the Facebook API (as of October 11, 2011).
The only contact info you can get is the user's email address, and you must explicitly request that permission in order to have access to it. You'll note in the page I just linked to that the "email" permission is only available for the user, not for the user's friends.
As far as other contact info, like phone numbers and home addresses, that is not currently available, even for an authenticated user. (See this SO question, where one answer references this Facebook blog post, which describes how Facebook added (on January 14, 2011) two new permissions, "user_address" and "user_mobile_phone", but the previous link to the Facebook permissions page makes it clear that those permissions are no longer available. And even if they were still available, they were only meant for an authenticated user, not for a user's friends.)
It's only possible to view public information of a user's friends and any other user for that matter. You must get each individual user to accept a permission request from your application - this will then give you permission to extra information.
You haven't specified which contact information you're wanting, but with any permissions granted you will be unable to request the phone number, you can however get the email address of the current user by requesting the 'email' permission documented here. You'll notice on on the documentation, that in the Friend's Permission column for email says 'N/A' (thus, you can't get a user's friends email addresses).
Another thing to notice is that it's not even possible to retrieve your own phone number using the Graph API.