asset_feed_spec
欄位可讓您向不同的用戶投放不同的廣告創意組合。設定組合的方式有兩種:
素材摘要規格包含各種不同的廣告創意素材,例如圖像、標題、正文等等。您可以為每種素材類型指定多項廣告創意素材。規格的格式依各個使用案例而不同。另請參閱參考資料:素材摘要規格。
您可以使用 asset_feed_spec
來提供多項廣告創意素材,但有以下限制:
asset_feed_spec
中應包含至少兩個目標客製化規則。 asset_feed_spec
中不應包含客製化規則。若是這種情況,您可以在 ad_formats
下指定 [“AUTOMATIC_FORMAT”]
,以在不同廣告版位之間混合使用圖像和影片。例如,若要建立活用型廣告創意的 asset_feed_spec
:
curl -X POST \
-F 'name="Dynamic Ad Creative with Asset Feed Spec Sample"' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>"
}' \
-F 'asset_feed_spec={
"images": [
{
"hash": "<IMAGE_HASH>"
}
],
"bodies": [
{
"text": "Begin Your Adventure"
},
{
"text": "Once a Trainer, always a Trainer."
}
],
"titles": [
{
"text": "Level Up"
},
{
"text": "Swipe to evolve"
}
],
"descriptions": [
{
"text": "First Dynamic Ad Creative Sample"
}
],
"ad_formats": [
"SINGLE_IMAGE"
],
"call_to_action_types": [
"SHOP_NOW"
],
"link_urls": [
{
"website_url": "https://www.example.com/"
}
],
"videos": []
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
您也可以建立包含兩個替換影片、正文和標題的 asset_feed_spec
:
curl \ -F 'object_story_spec={ "page_id": "YOUR_PAGE_ID" "instagram_actor_id" : "INSTAGRAM_ACTOR_ID", }' \ -F "asset_feed_spec={'videos': [{'video_id':'2053108854721025', 'thumbnail_url':'<thumnail_url>', 'url_tags':'video=video1'},{'video_id':'2104406249780616', 'thumbnail_url':'<thumnail_url>','url_tags':'video=video2'}], 'bodies': [{'text':'Begin Your Adventure'}, {'text':'Once a Trainer, always a Trainer.'}], 'titles': [{'text':'Level Up'}, {'text':'Swipe to evolve'}], 'descriptions': [{'text':'Begin Your Adventure'}], 'ad_formats': ['SINGLE_IMAGE'], 'link_urls': [{'website_url':'<WEBSITE_URL>'}]}" \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
若要查看您的廣告創意,請讀取 asset_feed_spec
:
curl -X GET \
-d 'fields="asset_feed_spec"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/<CREATIVE_ID>/
如果您的活用型廣告創意摘要包含多個圖像和正文,則回應如下所示:
{ "asset_feed_spec":{ "images":[ { "url_tags":"image=image1", "hash":"785095162a2034666e0d0cc4ea1faf89" }, { "url_tags":"image=image2", "hash":"3a24122c13923569599be35567ce4e9e" } ], "bodies":[ { "text":"Begin Your Adventure" }, { "text":"Once a Trainer, always a Trainer." } ], "call_to_action_types":[ "LEARN_MORE" ], "call_to_actions":[ { "type":"LEARN_MORE" } ], "descriptions":[ { "text":"Begin Your Adventure" } ], "link_urls":[ { "website_url":"<WEBSITE_URL>" } ], "titles":[ { "text":"Swipe to evolve" }, { "text":"Level Up" } ], "ad_formats":[ "SINGLE_IMAGE" ], "optimization_type":"REGULAR" }, "id":"<AD_CREATIVE_ID>", }
如果您的活用型廣告創意摘要包含多個影片、正文和標題,則回應如下所示:
{ "asset_feed_spec":{ "videos":[ { "url_tags":"video=video1", "video_id":"2053108854721025", "thumbnail_url":"<thumnail_url>", "thumbnail_hash":"<thumnail_hash>" }, { "url_tags":"video=video2", "video_id":"2104406249780616", "thumbnail_url":"<thumnail_url>", "thumbnail_hash":"<thumnail_hash>" } ], "bodies":[ { "text":"Begin Your Adventure" }, { "text":"Once a Trainer, always a Trainer." } ], "call_to_action_types":[ "LEARN_MORE" ], "call_to_actions":[ { "type":"LEARN_MORE" } ], "descriptions":[ { "text":"Begin Your Adventure" } ], "link_urls":[ { "website_url":"<WEBSITE_URL>" } ], "titles":[ { "text":"Swipe to evolve" }, { "text":"Level Up" } ], "ad_formats":[ "SINGLE_VIDEO" ], "optimization_type":"REGULAR" }, "id":"<AD_CREATIVE_ID>", }
您可以新增、替換或移除任何廣告創意素材。若要執行此作業,請提供另一個包含新 asset_feed_spec
的廣告創意。
您可以:
您不能:
SINGLE IMAGE
變更為 VIDEO
。asset_feed_spec
。
curl \
-F 'access_token=<ACCESS_TOKEN>' \
-F 'creative={
"creative_id": <CREATIVE_ID>,
}' \
https://graph.facebook.com/v21.0
/<AD_ID>
當您建立新的廣告創意來替換舊的廣告創意時,仍必須符合所有適用的限制。