Graph API Version

Ad Creative Link Data Call To Action Value

On Monday 6th February 2017caption and link_caption fields in ad creative will change datatype from String to URL. If you already use URLs for these fields, you are not impacted.

Reading

The data for a Call To Action button in an ad.

Example

Graph API Explorer
GET v5.0/...?fields={fieldname_of_type_AdCreativeLinkDataCallToActionValue} 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(
    '...?fields={fieldname_of_type_AdCreativeLinkDataCallToActionValue}',
    '{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(
    "...?fields={fieldname_of_type_AdCreativeLinkDataCallToActionValue}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_AdCreativeLinkDataCallToActionValue}",
    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:@"...?fields={fieldname_of_type_AdCreativeLinkDataCallToActionValue}"
                                      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
app_destination
string

The app destination type.

app_link
string

Deep link to the app.

application
string

Application related to the action.

event_id
numeric string

ID of the Facebook event which the attachement show event info

lead_gen_form_id
string

The Lead Ad form id.

link
string

The destination link when the CTA button is clicked. This is required to be same as the link url of the creative.

link_caption
string

Caption shown in the attachment. The caption must be an actual URL and should accurately reflect the URL and associated advertiser or business someone visits when they click on it.

link_format
string

Link format of video.

page
string

ID of the Facebook page which the CTA button links to

product_link
string

Open graph object url for canvas virtual good ads.

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.