I need to retrieve specific a listing from the Facebook Marketplace using FQL.
If you know the
the listing, it’s as simple as:
SELECT url, title, description, price, poster FROM listing WHERE listing_id = $listing_id;
If you don’t know the
listing_id but it was posted by
user and you do know the
title, you can do:
SELECT listing_id, description FROM listing WHERE title = $title AND poster = $user;
needs to be allowed to see the specified listing or you’ll get back an
empty set. Two things to note if you’re looking up a listing by
Listings aren’t unique by title, so you may well get more than one result back.
Remember that it’s an exact match, so you’ll need to get punctuation and capitalization exactly right.