Indexed Facebook Tables and Fields
Problem
Which Facebook tables can I run queries against?
Solution
As of this writing, Facebook maintains a list of 17 tables you can query against. The Platform Wiki is a great source of information about which columns are contained in which table, so you should check there for information on building your own queries (see http://wiki.developers.facebook.com/index.php/FQL_Tables).
Note
For a quick overview of database indexing, see the Discussion in FQL Query Structure.
The list of available tables, along with the indexed
columns you can use in WHERE
clauses, includes:
album
Storage for albums created in the Facebook Photos app. You can query on:
aid
(album ID of the album you’re looking for)cover_pid
(photo ID of the photo used on the cover)owner
(ID of the owner whose albums you’re looking for)
See Album Table for more information.
cookies
Browser cookies that your application might have dropped. This will only return cookies for your app, and there’s no way to request cookies for a different app for Facebook in general. You can query on:
uid
(user ID associated with the cookie)
See Cookie Table for more information.
metrics
Metrics for your application. These are limited to your app, and there’s no way to request metrics for a different app. You can query on:
end_time
(end date and time that metrics were collected, in epoch seconds). Note that the query is indexable (and therefore allowed) only if the date range of results is bounded and less than 30 days. See ...
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.