Find a Facebook User Friends who also use my Android app?

My application has an instant messaging feature. Therefore, he has a contact list. I want to fill out a contact list to help my user start with some friends.

After obtaining permission, I:

1) Find the local contacts database, send phone numbers to my server and check other accounts using my application that has the same phone number.

2) Ask them if they also want to import their friends into facebook. At what point, I believe, I will ask them for their username and password for facebook, go to the Graph API and request a list of my friends.

My question is: as soon as I repeat the friends list from my facebook user friends list, how can I link their facebook friend id (or some identifier that Facebook gives me) to some other identifier in my application?

Will I see a letter from all the users of my friends (after research, it seems that not)? Will I just get the numerical identifier of Facebook? If so, how do I collect facebook ids from all of my users who have linked their facebook account to my application?

I suspect that this feature was implemented by other third-party developers. So I'm looking for a strategy to identify and link application users to facebook accounts, and then iterate through the application user friends list to find regular users.

The question that I answer from the point of view of the user is "Which of my friends on facebook already uses this application called XYZ on android"

+6
source share
1 answer

You can save the Facebook user ID along with your other user information for your application, and then map the received identifiers to a call to the Graph API / friends. This way, you can see which friends also associated the application with their Facebook account. You will not be able to receive email addresses for friend-friends using the API.

+2
source

Source: https://habr.com/ru/post/908686/


All Articles