Accessing contact information of a facebook app user - facebook

I have access_token for facebook application. Is there a way I can get the contact information(phone-number) of the user of my facebook application?
Below is the url which returns me all the public information like name, location, education etc.. but not any contact information
https://graph.facebook.com/me?access_token=XXXX....
Thanks in advance!!

You can't get a phone number from the Graph API. You can get an email though if you have the email extended permission: http://developers.facebook.com/docs/authentication/permissions. If you are a whitelisted app I believe you can send Facebook messages as well through the API.

Related

How to get a facebook user's friends emails

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.

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.

Getting friend user id, and their photos

I am doing some research into the capacity of Facebook Connect. I have some questions on how a couple of bits of functionality.
Is it possible to fetch a list of all friends of a user?
The idea of this is that a user would log in using my site and then they could search through their friends and select one, and the site would get that friends users id and store it to the sites database.
Getting a photos from that user
After getting the friends user id, would it then be possible to get their photos? Or would the friend need to give the site permission to do that?
I am looking into a site where you can buy a greetings card for a friend, and i wanted to know whether my users would be able to login via facebook, pick a friend, get a photo and then at the time of their birthday it would send them a private message (which i think i know how to do) linking them back to my site where they could view the birthday card and their photo.
Thanks
To answer your questions:
Yes. Once you have an access token from the login process for a user, make a Graph API request to https://graph.facebook.com/me/friends. You can test this for yourself here: https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends
Yes. During the login process, you must request user_photos and friends_photos permissions after which you can use the access token for a Graph API request to https://graph.facebook.com/USERID/photos. This will only return those photos for a friend which the user is allowed to see for the current privacy settings.

How to get Any user's email Id from facebook graph api

I am using facebook graph api and I am able to get the email id of logged in user. I want to know that how can I retrieve any of my Friends email id using his/her id .
Is it possible or not ?
Thanks
No, you cannot retrieve emails nor phones of your friends through API. Facebook restricts this for security reasons.

how to show facebook and twitter user profile image on my website's comments

I am showing Gravatar's Avatar on my webpage comments
like that
$hash = md5(trim($row['email']));
$default_usr = urlencode('http://localhost/example/images/user-icon.jpg');
src=\"http://www.gravatar.com/avatar/$hash.'.jpg?s=45&d=$default_usr'\"
but i want that as avatar's when someone post a comment on my website using an email
which belong to its facebook account or twitter account his/her 's image shows on my website's comments too.
But i don't know how?
Any Facebook Lover or twitter lover who can help me Please Please.
I do not want to use facebook app i am developing my own comment widget using php where i want to use it
http://graph.facebook.com/paul.knox.anthony/picture
will get you the profile picture of a user from the Facebook graph API. file_get_contents() with PHP should allow you to grab that. However, it looks like you only have the email address of the user. In that case, you'll need authorisation from Facebook to get the user from just an email address.
See: Is there a way to get an user's email ID after verifying his/her Twitter identity using OAuth?
Facebook API - How do I get a Facebook user's profile image through the Facebook API (without requiring the user to "Allow" the application)
You are most likely going to have to do some OAuth stuff.