FbDevWiki is for sale on Flippa. Please take a look at the page if you're interested. There's only a few days left to the auction!

FQL:photo_tag

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

Query this table to return information about a photo tag.

You can also use the photo_tag FQL table to query for photos associated with a group (given its gid) or event (given its eid). See below for sample queries on how to do this.

You may first need to get the user_photo_video_tags or friend_photo_video_tags extended permission for queries to work.

Columns

Highlighted rows are indexable / searchable and one is usually required in the WHERE portion of the query.

Name Type Description
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.

subject int For tagged users, use the user ID of the subject for the tag being queried. For photos associated with events or groups, use the eid or gid for subject.
text string The content of the tag being queried.
xcoord float The center of the tag's horizontal position, measured as a floating-point percentage from 0 to 100, from the left edge of the photo.
ycoord float The center of the tag's vertical position, measured as a floating-point percentage from 0 to 100, from the top edge of the photo.
created time The date that the tag being queried was created.

Examples

Get all pids of photos associated with a user, given its user id (uid).

SELECT pid FROM photo_tag WHERE subject=$uid

Get all pids of photos associated with an event, given its event id (eid).

SELECT pid FROM photo_tag WHERE subject=$eid

Get all pids of photos associated with a group, given its group id (gid).

SELECT pid FROM photo_tag WHERE subject=$gid
Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox