Eternal Rubyist
Eternal Rubyist

Reputation: 3615

FQL : Retrieving a list of All User's Friends that Have Authorized My App

I have found various FQL querying solutions on other posts here on stackoverflow (Post 1, Post 2) to extract a list of all a user's friends that have authorized my application, but when I try to demo these on the Facebook Graph API, I get the following query parser error:

{
      "error": {
            "message": "(#601) Parser error: unexpected end of query.",
            "type": "OAuthException"  
      }
}

Here's the exact syntax I'm using for my query (taken from "Post 1" listed above)...

fql?q=SELECT uid, name, pic_square FROM user WHERE is_app_user  AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

Upvotes: 3

Views: 3218

Answers (1)

ifaour
ifaour

Reputation: 38135

I suggest adding =1 to your is_app_user (I guess it will work without it too):

SELECT uid, name, pic_square
FROM user 
WHERE is_app_user=1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

At one point, this was broken in the explorer, but as of June 2014, Facebook had fixed it. (Read this comment.)

Upvotes: 3

Related Questions