Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to find Facebook/Twitter/Google Friends using the same app

I am building MVC C# webapi backend for my mobile app, which uses one's Facebook/twitter/Google account to signup. Now, I want to get friends list corresponding to individual's account who are using same app.

Well this is where my problem starts, would I have to pull request every time or will I have to manage a table for this purpose or is there some other best practice.

Any help/guidance would be appriciated

like image 384
Tinku Chacko Avatar asked Jan 14 '14 14:01

Tinku Chacko


1 Answers

Once you create a App via the facebook app you can use FQL to get the names based on your applications id

Something like

SELECT uid, name FROM user WHERE is_app_user AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())";

You you basically use the facebook API to make a request to facebook which will return a JSONArray, you can parse out that a array to get a list of users.

Here is a very similar question Facebook API friends who use same app android

like image 140
blackmind Avatar answered Oct 05 '22 22:10

blackmind