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
friend_photo_video_tags extended permission for queries to work.
Highlighted rows are indexable / searchable and one is usually required in the WHERE portion of the query.
|pid||string|| The ID of the photo being queried. The |
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.|
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