asset_feed_spec —see also Available Languages.asset_feed_spec in creative_specasset_feed_specasset_feed_specs. An asset feed is a collection of different creative elements, such as image, titles, bodies, and so on. You create an asset_feed_spec at /adcreative.asset_feed_spec, provide an array of assets for each different language. Add a label to tag each asset to identify the language the asset belongs to. Facebook uses the labels in asset_customization_rules to group assets together by language. You should provide at least one asset per asset type.asset_feed_spec include:| Property Name | Description |
|---|---|
imagestype: array | Required for SINGLE_IMAGE ad format. Provide url or hash.Images as url or hash. You should provide images which are in the ad account’s image library.
Provide this field as an array of {"url": "<IMAGE_URL>", "hash": "<IMAGE_HASH>", "url_tags": "<TAG>", "adlabels": [{name: "<LABEL>"}]}. |
videostype: array | Required for SINGLE_VIDEO ad format.Array of video_ids. Videos should be in the ad account’s video library.
Provide this field as an array of {"video_id": "<VIDEO_ID>","thumbnail_url": "{<THUMBNAIL_URL>}", "url_tags": "{<TAG>}", "adlabels": [{"name": "<LABEL>"}]}. |
bodiestype: array | Required, but url_tags are optional.Array of bodies containing primary message of ad.
Provide this field as an array of {"text": "<BODY_TEXT>", "url_tags": "<TAG>", "adlabels": [{"name": "<LABEL>"}]}. |
titlestype: array | Required, but url_tags are optional.Array of titles. A short headline in the ad, generally shown next to a link, image or video. Provide this field as an array of {"text": "<TITLE>", "url_tags": "<TAG>", "adlabels": [{"name": "<LABEL>"}]}. |
descriptionstype: array | Required, but url_tags are optional.Array of secondary description text, displayed less prominently than bodies or titles. Provide this field as an array of {"text": "<DESCRIPTION>", "url_tags": "<TAG>", "adlabels": [{"name": "<LABEL>"}]}. Use an empty string with a single space for blank description. |
link_urlstype: array | Required, but display_url and deeplink_url are optional.Array of link URLs. Provide this field as an array of {"website_url": "<URL>", "adlabels": [{"name": "<LABEL>"}], "deeplink_url": "<DEEPLINK>", "display_url": "<URL>"}. |
call_to_action_typestype: array | Required. Array of call-to-action-type values. Provide this field as an array of supported call to actions: ["<CALL_TO_ACTION>"]. |
ad_formats | Required. Array of Facebook ad formats you want to create the ads in. Supported formats are: SINGLE_IMAGE, SINGLE_VIDEO.Provide this field as an array of supported ad formats: ["{<AD_FORMAT>}"]. |
asset_customization_rulestype: see table below under Asset Customization Rules | Required. Array of asset customization rules. |
customization_spec which defines the locales of people who view these assets during ad delivery.| Property Name | Description |
|---|---|
customization_spectype: {"locales": [<LOCALE1>, <LOCALE2>]} | Required. Define the locales where the assets in this rule should deliver. For supported locales, see Available Languages. |
image_labeltype: {"name": "<LABEL>"} | Required for SINGLE_IMAGE ad format.Label attached to one of the image assets in the asset feed. |
video_labeltype: {"name": "<LABEL>"} | Required for SINGLE_VIDEO ad format.Label attached to one of the video assets in the asset feed. |
body_labeltype: {"name": "<LABEL>"} | Required. Label attached to one of the body assets in the asset feed. |
title_labeltype: {"name": "<LABEL>"} | Required. Label attached to one of the title assets in the asset feed. |
description_labeltype: {"name": "<LABEL>"} | Required. Label attached to one of the description assets in the asset feed. |
link_url_labeltype: {"name": "<LABEL>"} | Required. Label attached to one of the link_url assets in the asset feed. |
is_defaulttype: boolean | Required. Boolean flag to identify the default rule. You should set exactly one rule with is_default flag as true. |
customization_spec must be locale IDs supported in ads targeting. See Targeting and Placement, Locales. You can search for specific language using the /search endpoint. Use the q parameter to search for a specific language name. Leave this parameter blank to get the list of all supported languages:curl -G \
-d "type=adlocale" \
-d "q=en" \
-d "limit=2" \
-d "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/v25.0/search
{
"data": [
{
"key": 6,
"name": "English (US)"
},
{
"key": 24,
"name": "English (UK)"
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MAZDZD",
}
}
}
asset_feed_spec field in POST ad_account_ID/adcreatives:curl \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"instagram_user_id": "<IG_USER_ID>",
}' \
-F 'asset_feed_spec={
"ad_formats": ["SINGLE_IMAGE"],
"bodies": [
{
"text": "Try our delicious guacamole recipe!",
"adlabels": [{"name": "english"}],
},
{
"text": "Essayez notre délicieuse recette de guacamole!",
"adlabels": [{"name": "french"}],
},
],
"titles": [
{
"text": "Jaspers Market",
"adlabels": [{"name": "english"}],
},
{
"text": "Jaspers Market",
"adlabels": [{"name": "french"}],
},
],
"descriptions": [
{
"text": "The best avocados!",
"adlabels": [{"name": "english"}],
},
{
"text": "Les meilleurs avocats!",
"adlabels": [{"name": "french"}],
},
],
"link_urls": [
{
"website_url": "www.jaspersmarket.com/en",
"adlabels": [{"name": "english"}],
},
{
"website_url": "www.jaspersmarket.com/fr",
"adlabels": [{"name": "french"}],
},
],
"images": [
{
"hash": "<IMAGE_HASH>",
},
],
"call_to_action_types": ["SHOP_NOW"],
"asset_customization_rules": [
{
"customization_spec": {
"locales": [9,44],
},
"title_label": {"name": "french"},
"body_label": {"name": "french"},
"description_label": {"name": "french"},
"link_url_label": {"name": "french"},
},
{
"is_default": true,
"customization_spec": {
"locales": [24]
},
"title_label": {"name": "english"},
"body_label": {"name": "english"},
"description_label": {"name": "english"},
"link_url_label": {"name": "english"},
},
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
{"id":"238474593777777"}
asset_feed_spec does meet the restrictions below, you see an error.POST act_AD_ACCOUNT_ID/ads. Alternatively, to display different languages in your ad, provide the asset_feed_spec and object_story_spec in the creative parameter for the ad.asset_feed_spec, you call GET on the ad ID or the ad creative ID:curl -G \
-d 'fields=object_story_spec,asset_feed_spec' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<CREATIVE_ID>
generatepreview endpoint. Add a dynamic_asset_label field with an adlabel in a rule to view a specific language version.curl -G \
--data-urlencode 'creative={
"object_story_spec": {
"page_id": "<PAGE_ID>"
},
"asset_feed_spec": {
...
}
}' \
-d 'ad_format=DESKTOP_FEED_STANDARD' \
-d 'dynamic_asset_label=french'
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/generatepreviews
autotranslate to asset_feed_spec. Then, specify the languages you would like your copy to be translated to. See example:curl \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"instagram_user_id": "<IG_USER_ID>",
}' \
-F 'asset_feed_spec={
"ad_formats": ["SINGLE_IMAGE"],
"autotranslate": ["fr_XX"],
"bodies": [
{
"text": "Try our delicious guacamole recipe!",
"adlabels": [{"name": "english"}],
}
],
"titles": [
{
"text": "Jaspers Market",
"adlabels": [{"name": "english"}]
}
],
"descriptions": [
{
"text": "The best avocados!",
"adlabels": [{"name": "english"}]
}
],
"link_urls": [
{
"website_url": "www.jaspersmarket.com",
"adlabels": [{"name": "english"}]
}
],
"images": [
{
"hash": "<IMAGE_HASH>"
},
],
"call_to_action_types": ["SHOP_NOW"],
"optimization_type": "LANGUAGE",
"asset_customization_rules": [
{
"is_default": true,
"customization_spec": {
"locales": [6]
},
"title_label": {"name": "english"},
"body_label": {"name": "english"},
"description_label": {"name": "english"},
"link_url_label": {"name": "english"}
}
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
asset_feed_spec field on the creative.autotranslate field. These edits will be replaced by fresh translations from the default ad copy. If you absolutely need the edits, remove the language from the autotranslate field.link_urlslanguage-specific URL to the link_urls field along with an adlabel and add a new rule into asset_customization_rules with the associated locale codes and link_url_label for this language.asset_feed_specSINGLE_IMAGE format, you must provide at least one image.SINGLE_VIDEO format, you must provide at least one videocall_to_action_types.call_to_action_type asset for all objectives.titles, bodies, descriptions and link_urls, for every language version in the asset feed.adlabels field.adlabel. We use this image or video for all the language versions.adlabels and provide these labels in your asset customization rule.url_tags, we append them to the link_url as parameters for each asset in the ad.APP_INSTALLS objective, your link_url should be the same as the ad set’s promoted_object.object_store_url.asset_feed_spec.is_default set to true. This acts as a backup rule and enables ads to display even when someone’s locale does not match any of the languages in asset_feed_spec.LINK_CLICKS - Website and apps, no Messenger.APP_INSTALLS - Desktop or mobile apps.CONVERSIONS - Website and apps, no Messenger.REACH - All destination types.BRAND_AWARENESS - All destination types.VIDEO_VIEWS - All destination typesREACH - Reach and FrequencyAUCTIONautotranslate field:| Source Language | Target Translation Language | Dialect Code |
|---|---|---|
English | Spanish | es_XX |
English | French | fr_XX |
English | German | de_DE |
English | Portuguese | pt_XX |
English | Italian | it_IT |
English | Arabic | ar_AR |
English | Dutch | nl_XX |
English | Malay | ms_MY |
English | Swedish | sv_SE |
English | Indonesian | id_ID |
English | Polish | pl_PL |
English | Hindi | hi_IN |
English | Danish | da_DK |
English | Turkish | tr_TR |
English | Tagalog | tl_XX |
English | Romanian | ro_RO |
German | English | en_XX |
Arabic | English | en_XX |
Hebrew | English | en_XX |
Spanish | English | en_XX |
Japanese | English | en_XX |
Norwegian | English | en_XX |
French | English | en_XX |
Dutch | English | en_XX |
Swedish | English | en_XX |