October 2008
Intermediate to advanced
434 pages
12h 7m
English
I need to retrieve specific a listing from the Facebook Marketplace using FQL.
If you know the listing_id of
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;
The current loggedinuser
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
title:
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.
Read now
Unlock full access