Reputation: 13
I'm using the Facebook Unity SDK 5.0.3 (building an Andorid player) and running into an issue trying to get a list of the friends which use the application. Have found various examples which use fql for that purpose, e.g "'/fql?q=SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1'", but using the last in FB.API ended up with "400 Bad Request" error. Any ideas? 10x
Upvotes: 0
Views: 1428
Reputation: 13
Well, manage to find the solution. The problem was using FQL from JavaScript documentation example as is. The following code does the work:
var fqlQuery = "/fql?q=" + WWW.EscapeURL("SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1"); FB.API(fqlQuery, Facebook.HttpMethod.GET, GetFbFriendsCallback);
The GetFbFriendsCallback code can be found in Smash Friends sample application provided with SDK.
Upvotes: 1