Listing Table

Problem

What’s the schema for the listing table?

Solution

The listing table stores the listings created in the Facebook Marketplace application. Its fields are listed in Table 8-13. Queries to this table will only return data the current user is allowed to see (i.e., you can’t request listing that the current loggedinuser can’t see). More information about this table, including an up-to-date listing of fields, can be found at http://wiki.developers.facebook.com/index.php/Listings_(FQL).

Table 8-13. listing table fields

Name

Type

Index

Description

listing_id

int

Listing ID of this listing.

url

string

 

URL pointing to this listing on Facebook.

title

string

 

Title of this listing.

description

string

 

Description of this listing.

price

string

 

Price of this item as a string (rather than a float).

poster

int

User ID of the user who posted this item.

update_time

string

 

The last time this item was updated in epoch seconds. For more info about epoch seconds, see Formatting Relative Time.

category

string

 

The top-level categories for listings are JOBS, FORSALE, HOUSING, FREESTUFF, and OTHER.

subcategory

string

 

Subcategories are the level below the category. Each category has about five subs (e.g., “For Sale” breaks down into “Books”, “Furniture”, “Tickets”, “Electronics”, “Cars”, and “Other”).

image_urls

array

 

An array of the images uploaded to this listing. Users can add four images when they create the listing and can add more after it’s been created (which is a really effective user ...

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.