asset_feed_spec. See Ad Asset Feed Spec for more reference information.| Property Name | Description |
|---|---|
imagestype: array of list | Required for SINGLE_IMAGE and CAROUSEL_IMAGE format.Array of eligible images. Images provided in this array should be included in the ad account’s image library.
Provide this field as an array of list containing {"url": "{IMAGE_URL}", "hash": "{IMAGE_HASH}", "url_tags": "{TAG}"}. Either url or hash is required. |
videostype: array of list | Required for SINGLE_VIDEO format.Array of video_ids. The video_ids provided in this array should belong to the ad account.
Provide this field as an array of list containing {"video_id": "{VIDEO_ID}", "thumbnail_url": "{THUMBNAIL_URL}", "url_tags": "{TAG}"} |
carouselstype: array of list | Optional. An array of child_attachments along with the multi_share_end_card and multi_share_optimized Booleans, and adlabels. The child_attachments provided in this array should belong to the ad account.Provide the child_attachments as an array of list containing {"image_label": {"name": "{IMAGE_LABEL}"}, "video_label": {"name": "{VIDEO_LABEL}"}, "title_label": {"name": "{TITLE_LABEL}"}, "description_label": {"name": "{DESC_LABEL}", "link_url_label": {"name": "{LINK_URL}"}}.Note: Either image_label or video_label is required.See Field Specifications for more information. |
bodiestype: array of list | Optional. Array of bodies. The primary message or copy of the ad.
Provide this field as an array of list of {"text": "{BODY_TEXT}", "url_tags": "{TAG}"}. |
call_to_action_typestype: array of list | Required for all objectives, except OUTCOME_AWARENESS.Array of call-to-action-type values.
Provide this field as an array of list of {"{CALL_TO_ACTION}"}. You can provide multiple values, up to five. |
titlestype: array of list | Optional. Array of titles. A title is a short headline in the ad, generally shown next to a link, image or video.
Provide this field as an array of list of {"text": "{TITLE}", "url_tags": "{TAG}"}. |
descriptionstype: array of list | Optional. Array of secondary description text, displayed less prominently than bodies or titles. Generally appears next to a link, image or video. If not specified, Facebook scrapes the link you provided to generate it. Use an empty string with single space for blank description, if you do not want to use the scraped text.
Provide this field as an array of list of {"text": "{DESCRIPTION}", "url_tags": "{TAG}"}. |
link_urlstype: array of list | Required. Array of link URLs.
Provide this field as an array of list of {"website_url": "{URL}"}. |
ad_formatstype: array of strings | Required. Array of Facebook ad formats we should create the ads in. Supported formats are: SINGLE_IMAGE, CAROUSEL, SINGLE_VIDEO, AUTOMATIC_FORMAT.
Provide this field as an array of strings ["{AD_FORMAT}"]. |
optimization_typetype: string | Optional. Optimization type used in asset feed. Possible values are ASSET_CUSTOMIZATION, LANGUAGE, PLACEMENT, and REGULAR. |
message_extensionstype: array of list | Optional. Sets the message extension type for website ads. This must be passed in as an inline creative in the POST /ads call.
Values: whatsapp, messenger, instagram_message |
onsite_destinationstype: array of list | Required for Shops Ads. Valid for Static Ads; SINGLE_IMAGE, SINGLE_VIDEO or CAROUSEL format.Provide this field as an array of list containing one of the following values to specify the landing destination for your onsite shop. |
shops_bundletype: boolean | Required for Shops Ads. Valid for Advantage+ Catalog Ads. Provide this field for shop optimization. Includes both reasons_to_shop and automated_product_tags shop optimization types.Possible values: true, false |
reasons_to_shoptype: boolean | Required for Shops Ads. Valid for Advantage+ Catalog Ads. Provide this field for shop optimization. Automatically highlights product information from your shop, like “Free shipping”, “Trending” or “Low stock”. Possible values: true, false |
ad_formats: SINGLE_IMAGE, CAROUSEL, SINGLE_VIDEO, and AUTOMATIC_FORMAT.ad_format is allowed per asset feed.ad_format counts as one asset in an asset feed.images, 5 bodies, 5 titles, 5 description, 1 ad_format, 1 link_url, and 1 call_to_action_types.CAROUSEL_IMAGE format, you must provide at least 2 images.CAROUSEL_IMAGE, titles are optional.url_tags are optional and only available for images, videos, bodies, descriptions, and titles. Facebook appends url_tags to the link URL as parameters for each asset in an ad.SINGLE_IMAGE format is:imagesbodiestitlesdescriptionsSINGLE_IMAGElink_urls"link_urls=[{'website_url':'<WEBSITE_URL>'}, {'website_url':'<WEBSITE_URL>'}]"
APP_INSTALLSCONVERSIONSLINK_CLICKSdeeplink_url in link_urls when you create your asset_feed_spec.curl \
-F 'object_story_spec={
"page_id": "<PAGE_ID>"
"instagram_user_id" : "<IG_USER_ID>",
}' \
-F "asset_feed_spec={
'images': [{'hash':'<IMAGE_HASH>'}],
'bodies': [{'text':'<BODY_1>'}, {'text':'<BODY_2>'}],
'titles': [{'text':'<TITLE_1>'}, {'text':'<TITLE_2>'}],
'descriptions': [{'text':'<DESCRIPTION>'}],
'ad_formats': ['SINGLE_IMAGE'],
'link_urls': [{'website_url':'<APP_OBJECT_STORE_URL>','deeplink_url':'<DEEPLINK_URL>'}]}" \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
message_extensions property to create ads that can guide potential customers from your website to a direct WhatsApp, Messenger, or Instagram conversation with your business. When customers click on the ad from a mobile device, your website opens in an in-app browser for Facebook and Instagram. At the bottom of the page, customers see a footer with a button to redirect to your specified messaging destination and can click on it to have a conversation with you about your products or services.destination_type: WEBSITE or UNDEFINED.message_extensions parameter and pass it inline via the ad creative object. For example, to create a website to WhatsApp ad:curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
-F 'name=<AD_NAME>' \
-F 'adset_id=<ADSET_ID>' \
-F 'creative={"object_story_spec":{"page_id":"<PAGE_ID>","link_data":{"image_hash":"<IMAGE_HASH>","link":"<BUSINESS_URL>","message":"Visit our website!","call_to_action":{"type":"LEARN_MORE","value":{"link":"<BUSINESS_URL>"}}}},"asset_feed_spec":{"message_extensions":[{"type":"whatsapp"}]}}' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
message_extensions to [{"type":"messenger"}].message_extensions to [{"type":"instagram_message"}].{ "id": "<AD_ID>" }
/<AD_ID>:curl -G "https://graph.facebook.com/v25.0/<AD_ID>" \
-d "access_token=<ACCESS_TOKEN>" \
-d "fields=name,status,creative{asset_feed_spec},adset{destination_type}"
creative.asset_feed_spec.message_extensions: [{"type": "whatsapp"}] and adset.destination_type: "WEBSITE" or "UNDEFINED".