Graph API Version

Photo Tags

Tags on a Photo

Reading

The Users tagged in the photo

Graph API Explorer
GET /v2.10/{photo-id}/tags HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{photo-id}/tags'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{photo-id}/tags",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{photo-id}/tags",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{photo-id}/tags"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
No data
Other Apps
Permissions are not usually requested.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of TaggableSubject nodes.

The following fields will be added to each node that is returned:

FieldDescription

created_time

datetime

The time the tags was created

tagging_user

The user who added the tag

x

float

The x coordinate in the photo where the tag is

y

float

The y coordinate in the photo where the tag is

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You may only create up to 40 tags on a photo.

You can make a POST request to tags edge from the following paths:
When posting to this edge, no Graph object will be created.

Parameters

NameDescription
tag_text
string

Tag text

tag_uid
int

Tag UID

tags
list<Object>

An array of tag objects

x
float

The x-axis offset for the tag

y
float

The y-axis offset for the tag

tag_uid
int

The user_id of the tagged person

tag_text
string

Text associated with the tag

x
float

The x-axis offset for the tag

y
float

The y-axis offset for the tag

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
326Too many photo tags pending
100Invalid parameter
322Subject does not have permission to tag this photo
121Invalid photo id
200Permissions error
190Invalid OAuth 2.0 Access Token
368The action attempted has been deemed abusive or is otherwise disallowed

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.