How to get all my facebook app users?

I want to get a list of users connected to the application. Is there a way to do this using the FQL or Graph API?

+4
source share
3 answers

Using FQL, simply do:

 $fql="SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = ".$me['id'].") AND is_app_user = 1"; 

This is self-evident.

AFAIK, its not possible using the GRAPH API

+1
source

I used this and worked great. This will give you a list of your friends who approved the application, not all users.

 function getUsersApplication(){ var url = "https://api.facebook.com/method/friends.getAppUsers?access_token="+FB.getAccessToken(); $.ajax( { url : url, type : 'GET', dataType : 'text', data : null, success : function(data) { alert(data); } }); } 
+2
source

This works for me, here is an example of AS3:

 var fql:String = "select pic_square, uid, first_name from user where is_app_user = 1 and uid IN(SELECT uid2 FROM friend WHERE uid1 =" + Facebook.getSession().uid + ")"; 
+1
source

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


All Articles