October 2008
Intermediate to advanced
434 pages
12h 7m
English
I need to retrieve all of a specific user’s friends using FQL.
This is a really simple query:
SELECT uid2 FROM friend WHERE uid1 = $uid;
Luckily for FQL users everywhere, this query returns exactly the same result if you run it the other way around:
SELECT uid1 FROM friend WHERE uid2 = $uid;
You can run this query only when you’re looking for the
friends of the current loggedinuser, or you’ll get an “Error
604: Can’t lookup all friends of 12345; only for the logged in user”
error (see 600 Errors for more info).
Read now
Unlock full access