Photo Table
Problem
What’s the schema for the photo
table?
Solution
The photo
table stores the
photos
that have been created in
the Facebook Photos app. Its fields are listed in Table 8-16. Queries to this table will only
return data the current user is allowed to see (i.e., you can’t
request photos
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/Photo_(FQL).
Table 8-16. photo table fields
Name | Type | Index | Description |
---|---|---|---|
| int | • | Photo ID of this photo. |
| int | • | Album ID of this photo. |
| int | User ID that this photo belongs to. | |
| string | URL of the small picture for this photo (max width of 75 px and max height of 225 px). Might be empty if this field wasn’t set by the creator. | |
| string | URL of the big picture for this group (max width or height of 604 px). Might be empty if this field wasn’t set by the creator. | |
| string | URL of the picture for this photo (max width or height of 130 px). Might be empty if this field wasn’t set by the creator. | |
| string | URL to view this photo on Facebook. | |
| string | Caption for this photo. | |
| string | Date this photo was created in epoch seconds. See Formatting Relative Time for more about epoch seconds. |
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 photos ...
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.