Graph API Version

Page Call To Actions

Reading

The call-to-action created by this Page

Graph API Explorer
GET /v2.10/{page-id}/call_to_actions HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{page-id}/call_to_actions'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/call_to_actions",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/call_to_actions",
    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}/call_to_actions"
                                      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
  • pages_show_list
Other Apps
No data

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 PageCallToAction nodes.

paging

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

Validation Rules

ErrorDescription
100Invalid parameter

Creating

Permissions

  • A page access token with pages_manage_cta permission is required.
You can make a POST request to call_to_actions edge from the following paths:
When posting to this edge, a PageCallToAction will be created.

Parameters

NameDescription
android_app_id
int

ID of the App that stores the destination info on Android

android_deeplink
string

Destination deeplink for the call-to-action on Android

android_destination_type
enum {WEBSITE, APP_DEEPLINK, FACEBOOK_APP, PHONE_CALL, MESSENGER, EMAIL, NONE}
Default value: NONE

Destination type for the call-to-action on Android

android_package_name
string

Destination app for the call-to-action on Android

android_url
URL

Destination url for the call-to-action on Android

email_address
string

Email address that can be contacted by a user

intl_number_with_plus
string

International phone number with plus that can be called through a phone

iphone_app_id
int

ID fo the App that stores the destination info on iPhone

iphone_deeplink
string

Destination deeplink for the call-to-action on iPhone

iphone_destination_type
enum {WEBSITE, APP_DEEPLINK, FACEBOOK_APP, PHONE_CALL, MESSENGER, EMAIL, NONE}
Default value: NONE

Destination type for the call-to-action on iPhone

iphone_url
URL

Destination url for the call-to-action on iPhone

type
enum {BOOK_NOW, CALL_NOW, CHARITY_DONATE, CONTACT_US, DONATE_NOW, MESSAGE, OPEN_APP, PLAY_NOW, SHOP_NOW, SIGN_UP, WATCH_NOW, GET_OFFER, GET_OFFER_VIEW, REQUEST_QUOTE, BOOK_APPOINTMENT, LISTEN, EMAIL, LEARN_MORE, REQUEST_APPOINTMENT, GET_DIRECTIONS, BUY_TICKETS, PLAY_MUSIC, VISIT_GROUP}

The type of action

Required
web_destination_type
enum {EMAIL, MESSENGER, NONE, WEBSITE}
Default value: NONE

Destination type for the call-to-action on desktop

web_url
URL

Destination url for the call-to-action on desktop

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
200Permissions error
210User not visible

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.