Search code examples
facebook-graph-apiselectfacebook-fqluserid

Get list of usernames based on userID


I want to make a batch query similar to this:

SELECT name FROM user 
WHERE uid IN (userID1, userID2, userID3 ...) and name LIKE '%searchParameter%'

Is this even possible? And how can I achieve this?


Solution

  • Yes it is possible

    SELECT name, uid from user WHERE uid in (SELECT uid2 FROM friend WHERE uid1=me()) and strpos(lower(name),lower('Zuck')) >= 0

    In the case above I'm querying for names from friends that include the letters zuck

    http://developers.facebook.com/docs/reference/fql/user/