Album Table
Problem
What’s the schema for the album
table?
Solution
The album
table holds all of
the photo albums that users have created in the Facebook Photos
application. Its fields are listed in Table 8-2. Queries to this table will only
return data the current user is allowed to see (in other words, you
can’t request albums that this user isn’t allowed to 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/Album_(FQL).
Table 8-2. album table fields
Name | Type | Index | Description |
---|---|---|---|
| int | • | Album ID. |
| int | • |
|
| int | • |
|
| string | Name of the album. | |
| string | Creation date of the album. | |
| string | Date that the album was last updated, in epoch seconds (see Formatting Relative Time for an explanation of epoch seconds). | |
| string | Description entered by the album’s owner. | |
| string | Location entered by the album’s owner (e.g., Toronto, The Moon). | |
| int | The number of photos in the album. | |
| string | URL to the album (i.e., the actual Facebook URL for this album). |
Note that only the fields marked as “Index” in this table can be
used in an FQL query’s WHERE
clause, but any of the fields can appear in the SELECT
.
Discussion
If you’d rather use the API to access albums
, try the Photos.getAlbums()
method.
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.