Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting friends using the same application on Facebook

I'm using play framework to create a facebook application. I'm kinda stucked at some point. With Graph Api i can't take a list of friends who use my application. What i want to say is for example:

A is using my application.

B is using my application too and B is a friend of A.

When A is using my application, I want A to see B is also using this application.

Simply I want to get list of friends using same application.

How would i do that with Graph Api?

like image 750
LuckySlevin Avatar asked Dec 21 '22 03:12

LuckySlevin


1 Answers

There is a field called "is_app_user" on the user table that you could run a FQL query against. The query would be something like:

select uid, name 
from user 
where is_app_user = 1 
and uid in (SELECT uid2 FROM friend WHERE uid1 = me())

The graph url for that would be like this (remember to add an access token):

https://api.facebook.com/method/fql.query?query=select uid, name from user where is_app_user = 1 and uid in (SELECT uid2 FROM friend WHERE uid1 = me())&access_token=...

like image 109
bkaid Avatar answered Jan 18 '23 09:01

bkaid