Getting friends using the same Facebook app

I am using the play framework to create a facebook application. I was kind of stuck at some point. With Graph Api, I can’t take the list of friends who use my application. I want to say for example:

A uses my application.

B also uses my application, and B is a friend of A.

When A uses my application, I want A to see that B also uses this application.

I just want to get a list of friends using the same application.

How do I do this using Graph Api?

+4
source share
2 answers

The user table has a field called "is_app_user" from which you can run the FQL query. The query will look something like this:

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

The url graph for this will be like this (do not forget to add an access token):

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

+11
source

With a friend, Access Token makes a message to me/friends to get a list of friends. See if Friend B is on the list. See: http://developers.facebook.com/docs/reference/api/user/

0
source

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


All Articles