Fetch all Email address of facebook user in android - android

i m creating application in which i have to obtain friend list of facebook user account which i got but now i have to also obtain their Email addresses but not getting any kind of hint , tell me how can i fetch all Email addresses of facebook users in android

AFAIK Its not possible cause Facebook API doensn't provide it.
From Experience:
You can search and read a bit more in Facebook Graph API permission and you will find for contact information need to give extra permission "email" but while fetching user acoounts of Friends you wont get them even if they(friends) have set their info shared to everyone.

Related

How to get all email contacts from my gmail accounts?

I am implementing an app which need to get all emails contacts from current google email account .
I researched on this link below but it did not help.
https://developers.google.com/gmail/api/auth/scopes
I synced google email account to device contacts phone and then get all contacts phone but still can not see. Is there any way to get it ? Thank you.
I think you need to go though the Google people api
The People API lets you list and manage the authenticated user's Contacts and retrieve profile information for authenticated users and their contacts.
The Gmail api just contains emails.

Sigin my app with Google Account in Android

I have learned that there are many ways to sign in app with Google Account.
Here are two ways:
Use AccountManager.java ,
GOOD: can get user's email address and authToken.
BAD: can not get user's avatar and nickname.
Use Google+ Api:
GOOD: can get user's all info , but email address.
BAD: no email address, and the view's style is not matching to my app.
QUESTION:
1 .How can i get avatar and nickname by using only AccountManager ?
Is the Google+ Api's view be changed ? Any documents?
Thanks for any help!
You can get the Email address via the Google+ API. You need to add the appropriate scopes and permission.
The scopes are
Scopes.PROFILE
Scopes.EMAIL
And you need the following permission
android.permission.GET_ACCOUNTS
Then you can retrieve the Email address with the AccountApi
Plus.AccountApi.getAccountName(googleApiClient)
You can reference this guide from google doc.
After signin, handle result then get user information.

Facebook permission for friend's profile information

I am using Facebook as signup option for my android app. I need to know what permission should i ask to get access to user's friends profile info, work history and education history, relationship status. I am using user_friends to get it but its not working. I am using this another app that uses Facebook signup and when i look at App Settings in my facebook account then following are the permissions.
Your basic info.
Your email address (**).
Your groups.
Your location.
Friends' profile info: birthdays, education histories, groups, interests, locations, relationship statuses, websites and work histories(I want this permission for my app).
Please help me guys :)
Thanks a lot
If you created your app after 4/30/2014, you're using Graph API 2.0, and all friend_* permissions have been removed.
The only way to get a friend's info is if that friend also uses your app, in which case you can ask them for permissions directly and get the info you need.
If you have created your app before 4/30/2014 then you can use the following permissions.
"friends_interests","friends_birthday","friends_about_me","friends_education_history","friends_work_history"

Facebook friend list in android' error [duplicate]

is there any way to fetch list of friends using facebook 2.0 API?
I was reading this upgrade from the API and it seems it is quite difficult to fetch the friends now,
but I have seen 2 permissions
read_friendlist
user_friends
Is their any way to fetch list of friends? and what about the widgets that get friends from facebook, will they go down?
In v2.0 of the Graph API /me/friends returns the user's friends who also use the app. You need to be granted the user_friends permission in order to get even app-using friends.
There is no way in v2.0 to get the full user's friends.
However, you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API or the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends APIs to get all the user's friends with tokens than can be used for tagging and inviting.
the read_friendlist perm doesn't get you a list of the user's friends, it gets you the list of a user's friendlists which may be used to build a custom privacy selector when publishing stories to Facebook.
As of 4/30/2014, you can only retrieve the friends who also use the app.
There are, however, specific methods for apps in the 'Game' category for inviting friends.
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/

Find user's Facebook Friends that also use my Android App?

My app has an instant messaging feature. So it has a contact list.. I want to populate the contact list to help get my user started with some friends..
After asking permission I will:
1) Search the local contact database, send the phone numbers to my server and check for other accounts using my application that have the same phone number.
2) Ask them if they want to also import their facebook friends. At which point I suppose I will ask them for their username and password for facebook, log in to the Graph API and request their list of friends..
My question is, once I am iterating the list of friends from my user's facebook friends list, how can I link their facebook friend ID (or whatever identifier Facebook gives me) to some other ID in my app?
Will I see the email of all my friends users (after research, it looks like not)? Will I just get a numeric Facebook ID? If so, then how am I to harvest facebook IDs from all my users that have linked their account to facebook in my app?
I suspect this feature has been implement by other third party developers. So I'm looking for the strategy to identify and link my app users, to facebook accounts, and then iterate my app users friends list to find common users.
The question I am answering from a user perspective "Which of my facebook friends are already using this app, named XYZ on android"
You can store a user's Facebook ID alongside their other user information for your app, then match on the retrieved IDs from a Graph API /friends call. This way, you'll be able to see which friends have also linked the app to their Facebook account. You won't be able to fetch email addresses for a user's friends using the API.

Categories

Resources