Retrieving a User’s Listings

Problem

I need to retrieve all of the listings posted by a specified user using FQL.

Solution

SELECT url, title, description, price FROM listing WHERE poster = $uid;

Discussion

The current loggedinuser needs to be able to see this listings posted by the user you’re querying on, or you’ll get back an empty set.

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.