Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
  • Technology Partners
  • Tables
    • album
    • app_role
    • application
    • apprequest
    • checkin
    • comment
    • comments_info
    • connection
    • cookies
    • column
    • developer
    • domain
    • domain_admin
    • event
    • event_member
    • family
    • friend
    • friendlist
    • friendlist_member
    • friend_request
    • group
    • group_member
    • insights
    • like
    • link
    • link_image_src
    • link_stat
    • location_post
    • mailbox_folder
    • message
    • note
    • notification
    • object_url
    • page
    • page_admin
    • page_blocked_user
    • page_global_brand_child
    • page_fan
    • page_milestone
    • permissions
    • permissions_info
    • photo
    • photo_src
    • photo_tag
    • place
    • privacy
    • privacy_setting
    • profile
    • profile_tab
    • profile_view
    • question
    • question_option
    • question_option_votes
    • review
    • score
    • standard_friend_info
    • standard_user_info
    • status
    • stream
    • stream_filter
    • stream_tag
    • subscription
    • table
    • thread
    • translation
    • unified_message
    • unified_message_count
    • unified_message_sync
    • unified_thread
    • unified_thread_action
    • unified_thread_count
    • unified_thread_sync
    • url_like
    • user
    • video
    • video_tag

photo

API Reference › FQL › photo

Description

Query this table to return information about a photo.

Columns

NameDescription

aid

string

The ID of the album containing the photo being queried. The aid cannot be longer than 50 characters. Note: Because the aid is a string, you should always wrap the aid in quotes when referenced in a query.

aid_cursor

string

A cursor used to paginated through a query that is indexed on the aid

album_object_id

id

The object_id of the album the photo belongs to.

album_object_id_cursor

string

A cursor used to paginate through a query that is indexed on the album_object_id

backdated_time

timestamp

The time the photo was backdated to in Timeline

backdated_time_granularity

enum

A string representing the backdated granularity. Valid values are year, month, day, hour, or minute

can_backdate

bool

true if the viewer is able to backdate the photo

can_delete

bool

true if the viewer is able to delete the photo

can_tag

bool

true if the viewer is able to tag the photo

caption

string

The caption for the photo being queried.

caption_tags

array

An array indexed by offset of arrays of the tags in the caption of the photo, containing the id of the tagged object, the name of the tag, the offset of where the tag occurs in the message and the length of the tag.

comment_info

struct

The comment information of the photo being queried. This is an object containing can_comment and comment_count

can_comment

bool

Whether the comments are allowed on the object

comment_count

unsigned int32

The number of comments on this object.

comment_order

enum

The order that these comments are displayed on site.

created

timestamp

The date when the photo being queried was added.

images

array

An array of objects containing width, height, source each representing the various photo sizes.

like_info

struct

The like information of the photo being queried. This is an object containing can_like, like_count, and user_likes

can_like

bool

Whether the viewer can like the object.

like_count

unsigned int32

The number of likes on this object.

user_likes

bool

Whether or not the viewer likes this object.

link

string

The URL to the page containing the photo being queried.

modified

timestamp

The date when the photo being queried was last modified.

object_id

id

The object_id of the photo.

offline_id

number

The offline_id is specificed when uploading a photo to track the upload status of it later

owner

id

The user ID of the owner of the photo being queried.

owner_cursor

string

A cursor used to paginate through a query that is indexed on the owner

page_story_id

string

The ID of the feed story about this photo if itbelongs to a page

pid

string

The ID of the photo being queried. The pid cannot be longer than 50 characters. Note: Because the pid is a string, you should always wrap the pid in quotes when referenced in a query.

place_id

id

Facebook ID of the place associated with the photo, if any.

position

number

The position of the photo in the album.

src

string

The URL to the album view version of the photo being queried. The image can have a maximum width or height of 130px. This URL may be blank.

src_big

string

The URL to the full-sized version of the photo being queried. The image can have a maximum width or height of 720px, increasing to 960px on 1st March 2012. This URL may be blank.

src_big_height

unsigned int32

Height of the full-sized version, in px. This field may be blank.

src_big_width

unsigned int32

Width of the full-sized version, in px. This field may be blank.

src_height

unsigned int32

Height of the album view version, in px. This field may be blank.

src_small

string

The URL to the thumbnail version of the photo being queried. The image can have a maximum width of 75px and a maximum height of 225px. This URL may be blank.

src_small_height

unsigned int32

Height of the thumbnail version, in px. This field may be blank.

src_small_width

unsigned int32

Width of the thumbnail version, in px. This field may be blank.

src_width

unsigned int32

Width of the album view version, in px. This field may be blank.

target_id

numeric string

The ID of the target the photo is posted to

target_type

string

The type of target the photo is posted to

Examples

  • SELECT ... FROM photo WHERE pid = A
  • SELECT ... FROM photo WHERE aid = A
  • SELECT ... FROM photo WHERE aid = A AND pid = B
  • SELECT ... FROM photo WHERE album_object_id = A
  • SELECT ... FROM photo WHERE object_id = A
  • SELECT ... FROM photo WHERE owner = A
Note: Additional filters on other columns can be specified but they may make the query less efficient.

Permissions

To read the photo table you need

  • any valid access_token if it is public and owned by the Page.
  • user_photos permissions to access photos and albums uploaded by the user, and photos in which the user has been tagged.
  • friends_photos permissions to access friends' photos and photos in which the user's friends have been tagged.
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy