Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Android find friends feature

I am trying to create a social app with Firebase as my backend. Right now I am facing an issue on how(where?) to do the find friends feature.

  • I have every user's mail address.
  • I have access to the users' phone book also.

In a conventional backend, I will upload the phone book and find emails which are there in the backend and send that list back to the device.


With firebase (Where there is no backend server), I will have loop through every email in the phone book and see, if there is an account for that email. Isn't this a very ineffient method (considering, it is a waste of the mobile resources).? Is there a better way to do this?

like image 391
Codevalley Avatar asked May 31 '16 10:05

Codevalley


1 Answers

As firebase is supporting common Auth providers like Google, Facebook and Twitter. You can retrive the friends list from user's social login easily.

For implementation details; just follow the respective API documents below,

Google: https://developers.google.com/+/web/api/rest/latest/people/list

Facebook: https://developers.facebook.com/docs/graph-api/reference/friend-list/

Twitter: https://dev.twitter.com/rest/reference/get/friends/list

like image 71
Karthi R Avatar answered Oct 17 '22 07:10

Karthi R