## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# 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

`pid`

int

Photo ID of this photo.

`aid`

int

Album ID of this photo.

`owner`

int

User ID that this photo belongs to.

`src_small`

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.

`src_big`

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.

`src`

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.

`link`

string

URL to view this photo on Facebook.

`caption`

string

Caption for this photo.

`created`

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 ...`

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required