I have a PhoneGap app, where I need to list all the user’s friends, who have authorized the application on Facebook.
I’m currently using FB.api('/me/friends?fields=installed', callbackFnc), but this shows me all friends, pointing which of them have authorized the app. When I really wanted to list only the authorized ones.
This slows a lot the process of loading friends.
I saw other similar questions here, but none of them had the answer.
SOLUTION: Thanks to CBroe
I couldn’t have sucess passing the FQL directly to FB.api, but only using that object:
var apiQuery =
{
method: 'fql.query',
query: 'SELECT uid, name FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2 = me() ) AND is_app_user'
}
FB.api(apiQuery, function(response){...});
Use FQL instead:
(You can set up that query against the Graph API as well,
/fql?q={query}.)