Photos on Facebook can be 'tagged' by users—either the user that uploaded the original image, or by their friends (or any other user that has access to the Photo, such as a Group member).
A Tag is essentially a link between a portion of the Photo and another Facebook User, and exists as an object with x
and y
position properties, a name
to display at that location, and usually—but not always—a Facebook id
property.
In the Facebook website a Tag is represented by a small interactive area on a Photo which, when the user rolls over the area, displays their name as part of an overlay. In this recipe we're going to go partway in recreating this interface, loading the Tags information for the Photo and displaying the Tags as a permanent overlay on top of the Photo's image preview.