Retrieving Friends in a Specific Friend List

Problem

I need to retrieve the friends from a specific user’s specific friend list using FQL.

Solution

SELECT name FROM user WHERE uid IN (SELECT uid FROM friendlist
_member WHERE flid IN (SELECT flid FROM friendlist WHERE name = $name
 AND owner = $user));

Discussion

This will work only when user is the current loggedinuser.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.