Photos
Retrieves photos associated with a target. Accessing photo information typically requires an access token, or user_photos, or friends_photos permission depending on the access permissions of the photo. However, some photos may be viewed without an access token.
Table Specific Information
Photos in Facebook are photos that are uploaded by a user or to a page and are part of a photo album.
Select
When querying photos, a Target must be specified. The Target represents the user, page, album, or event that photos are being retrieved for. For example:
SELECT * FROM Photos WHERE Target = 'facebook'
If no Target is specified, the currently authenticated user will be used as the target.
When querying photos, elements may be retrieved by specifying either the CreatedTime or the UpdatedTime. For example:
SELECT * FROM Photos WHERE Target='thesimpsons' AND CreatedTime >= '1/1/2012' AND CreatedTime <= '10/1/2012'
Columns
| Name | Type | Description |
| ID [KEY] | String | The id of the photo. |
| Target | String | The id or username of the target you are retriving posts for or are posting to. This may be an album, event, page, or user. |
| FromId | String | Id of the user who uploaded the photo. |
| FromName | String | Name of the user who uploaded the photo. |
| FromCategory | String | Category of the user who uploaded the photo. |
| ToData | String | An aggregate of users the post was made to. |
| Link | String | A link to the photo on facebook. |
| Name | String | The name of the photo. |
| Picture | String | A link a thumbnail of the photo. |
| Source | String | The source image of the photo. |
| Height | Integer | The height of the photo. |
| Width | Integer | The width of the photo. |
| Position | Integer | The position of the photo in the album. |
| Icon | String | A link to the icon facebook displays when photos are published to the stream. |
| PlaceId | String | The id of the location associated with the post, if any. |
| PlaceName | String | The name of the location associated with the post, if any. |
| Images | String | An aggregate of four different images for the photo. |
| CommentsData | String | An aggregate of comments for this photo. |
| LikesData | String | An aggregate of likes data. |
| TagsData | String | An aggregate of objects describing the photo. |
| CreatedTime | Datetime | When the photo was uploaded. |
| UpdatedTime | Datetime | When the photo was last updated. |
Pseudo-Columns
Pseudo-Column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the Where section.
| Name | Type | Description |
| rows@next | String | This is used to page through multiple pages of results and should not be set manually. |