Graph API Version

Ad Creative Link Data Child Attachment

Reading

Data defining a child attachment associated with a link ad, used for Carousel ads.

Example

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

Call to action of this attachment. On Facebook, we support one optional CTA per attachment. If it not specified, there will be no CTA for this attachment.
On Instagram, there is one CTA per attachment. If the CTA is not specified, a CTA will be created by the system, using "Learn more" as the type, and the link from this child attachment as the link. If the CTA is specified, its link must be the same as the link of this child attachment.

caption
string

The display url shown at the end of a video, if the attachment is a video

description
string

Overwrites the description of each attachment on Facebook, not used on Instagram.

image_crops

Image crops, using the crop spec with 100x100 key for Carousel ads. If no 100x100 crop spec is provided, the image would be cropped automatically, unless the image is square already. The final cropped image size needs to be at least 200x200 pixels for Facebook, or 600x600 for Instagram.

image_hash
string

The image hash of an uploaded image for this attachment. For an ad on Facebook, if neither picture nor image_hash is set, the image of link_data above will be used. For an ad on Instagram, either picture or image_hash is required.

link
string

The link of this attachment.

name
string

Overwrites the title of the attachment on Facebook, not used on Instagram.

picture
string

The url of an image for this attachment. For an ad on Facebook, if neither picture nor image_hash is set, the image specified in link_data above will be used. For an ad on Instagram, either picture or image_hash is required.

referral_id
numeric string

If you are running Referral Ads in the carousel format, provide this ID. You can generate this ID in Graph Explorer or via the Marketing API at the {ad_account_id}/referral endpoint. Facebook uses this ID to attribute conversions back to a referred ad and to render the correct deep-link to the individual item being referred.

static_card
bool

Whether to force the card to render statically, even in a dynamic ad.

video_id
numeric string

ID of an uploaded video, if this attachment is a video. Not supported for Instagram 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.