I created an app and added 16 test users in the App interface. I made it so 5 of those users weren't affiliated with the app and the other 11 were. I had one user become friends with the other 15. I then tried various ways to retrieve a listing of a given user's friends.
https://graph.facebook.com/{RANDOM USER ID ON OUR APP}/friends?fields=installed&access_token={OUR APP ACCESS TOKEN}&format=json
yielded this
{
"error": {
"message": "(#604) Can't lookup all friends of {RANDOM USER ID ON OUR APP}. Can only lookup for the logged in user or the logged in user's friends that are users of your app.",
"type": "OAuthException",
"code": 604
}
}
FQL wasn't any better.
https://graph.facebook.com/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1={RANDOM USER ID ON OUR APP}&access_token={OUR APP ACCESS TOKEN}&format=json
yield this
{
"error": {
"message": "A user access token is required to request this resource.",
"type": "OAuthException",
"code": 102
}
}
I understand what's happening here. These calls are attempting to retrieve all friends of the user in question and as some users aren't members of the app I'm not allowed to make this call. So I need to make a call that allows me to get just the friends that are members of the app if that's possible.