Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"

like image 685
Daniel Guillamot Avatar asked Feb 17 '12 07:02

Daniel Guillamot


People also ask

How do I manage my Facebook friends on Android?

To add or remove friends from a list: Go to your friend's profile. Tap Friends. Tap Edit Friend List.


1 Answers

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.

like image 160
Connor Treacy Avatar answered Oct 20 '22 19:10

Connor Treacy