Graph API Version

Page Label

Reading

Page's label

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
  • manage_pages
  • pages_show_list
Page management Apps
  • manage_pages
Other Apps
No data

Examples

Graph API Explorer
GET /v2.9/{page-label-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{page-label-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-label-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-label-id}",
    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:@"/{page-label-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

creation_time

datetime

Time when the label was created

creator_id

Admin who created the label

from

Page that owns the label

id

numeric string

ID of the label

name

string

Name of the label

Edges

EdgeDescription

users

Users that are associated with this label

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You can make a POST request to labels edge from the following paths:
When posting to this edge, a PageLabel will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • manage_pages
Other Apps
No data

Parameters

NameDescription
name
string

Unique name of the label. Max string length is 255.

Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Validation Rules

ErrorDescription
100Invalid parameter

Updating

You can't perform this operation on this endpoint.

You may perform a POST request to the following edge from this node:

Validation Rules

ErrorDescription
100Invalid parameter

Deleting

You can delete a PageLabel by making a DELETE request to /{page_label_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}
You may perform a DELETE request to the following edge from this node:

Validation Rules

ErrorDescription
210User not visible