Graph API Version

Page Subscribed Apps

Subscribed Apps for a Facebook Page.

This edge allows you subscribe or unsubscribe an app for Webhooks for Pages.

All operations require a Page access token with either the publish_pages or manage_pages permission.

To create a subscription, the person who created the token must have moderator admin access or higher on the Page.

Reading

Apps that are subscribed to the page's webhook updates.

Example

Graph API Explorer
GET /v5.0/{page-id}/subscribed_apps HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{page-id}/subscribed_apps',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/subscribed_apps",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/subscribed_apps",
    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-id}/subscribed_apps"
                                      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

Reading from this edge will return a JSON formatted result:

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

data

A list of Application nodes.

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

FieldDescription
subscribed_fields
list<enum>

Webhook fields to which the app has subscribed on the page

paging

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

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
210User not visible
80001There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
190Invalid OAuth 2.0 Access Token
458The session is invalid because the application is not installed

Creating

When you create a subscribed_apps edge, the page-id you use in endpoint must match the page ID of the page access token used in the API call. The app that the access token is for is installed for the page.

Note that you cannot use this edge's subscribed_fields parameter to configure or subscribe to Webhooks for Instagram fields; you must use your app's dashboard instead.

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

Example

Graph API Explorer
POST /v5.0/{page-id}/subscribed_apps HTTP/1.1
Host: graph.facebook.com

subscribed_fields=leadgen
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{page-id}/subscribed_apps',
    array (
      'subscribed_fields' => 'leadgen',
    ),
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/subscribed_apps",
    "POST",
    {
        "subscribed_fields": "leadgen"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("subscribed_fields", "leadgen");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/subscribed_apps",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"subscribed_fields": @"leadgen",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}/subscribed_apps"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl -X POST \
  -F 'subscribed_fields="leadgen"' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v5.0/{page-id}/subscribed_apps
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
subscribed_fields
array<enum {feed, mention, name, picture, category, description, conversations, branded_camera, feature_access_list, standby, message_mention, messages, message_reactions, messaging_account_linking, messaging_checkout_updates, message_echoes, message_deliveries, messaging_game_plays, messaging_optins, messaging_optouts, messaging_payments, messaging_postbacks, messaging_pre_checkouts, message_reads, messaging_referrals, messaging_handovers, messaging_policy_enforcement, messaging_page_feedback, messaging_appointments, messaging_direct_sends, founded, company_overview, mission, products, general_info, leadgen, leadgen_fat, location, hours, parking, public_transit, page_about_story, commerce_order, mcom_invoice_change, invoice_access_invoice_change, phone, email, website, ratings, attire, payment_options, culinary_team, general_manager, price_range, awards, hometown, current_location, bio, affiliation, birthday, personal_info, personal_interests, publisher_subscriptions, members, checkins, page_upcoming_change, page_change_proposal, merchant_review, product_review, videos, live_videos, video_text_question_responses, registration}>

Page Webhooks fields that you want to subscribe

Required

Return Type

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

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
210User not visible
80001There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
159Invalid protocol, must be https

Updating

You can't perform this operation on this endpoint.

Deleting

Permissions

An app can remove its own realtime updates subscription from a page at this endpoint with an App Access Token.

You can dissociate an Application from a Page by making a DELETE request to /{page_id}/subscribed_apps.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
messaging_success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error
210User not visible
80001There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.