不再支援透過 API 使用現有貼文進行版位素材客製化。您只能在廣告管理員中使用此選項。
使用 asset_feed_spec
來提供您的廣告創意。您可以為每種素材類型指定多項廣告創意素材,包括圖像、影片、輪播、標題和文字。僅限提供一個連結說明,因為無法針對每個廣告版位自訂連結說明。
若要套用自訂內容:
asset_feed_spec
中設定 asset_customization_rules
。 customization_spec
和素材標籤。 針對版位素材客製化,每個 asset_feed_spec
都需要附加多項自訂規則。
請參閱素材客製化規則。
屬性名稱 | 說明 |
---|---|
類型:支援的欄位 | 必要項目。 您想要顯示素材的廣告版位。 |
格式: |
顯示圖像的標籤,附加至 |
格式: |
顯示影片的標籤,附加至 |
|
顯示輪播的標籤,附加至 備註:如果透過「版位素材客製化」提供輪播廣告,所有子附件必須在「素材摘要規格」中定義,並透過廣告標籤進行參照。子附件可能無法進行內嵌定義。請參閱關於 |
customization_spec
中支援的欄位屬性名稱 | 說明 |
---|---|
| 必要項目。 廣告的可能版位。選項有: |
| 選用項目,但如果在 Facebook 特定廣告版位。選項有: |
| 選用項目,但如果在 Instagram 特定廣告版位。選項有: 注意: |
| 選用項目,但如果在 Messenger 特定廣告版位。選項有: |
| 選用項目,但如果在 Audience Network 特定廣告版位。選項有: |
深入瞭解我們的可用廣告版位選項。
範例 — 摘要設定
curl \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"instagram_actor_id": "<INSTAGRAM_ACTOR_ID>",
}' \
-F 'asset_feed_spec={
"videos": [
{
"adlabels": [
{
"name": "labelfb"
}
],
"video_id": "<VIDEO_ID>"
},
{
"adlabels": [
{
"name": "labelig"
}
],
"video_id": "<VIDEO_ID>"
}
],
"bodies": [
{
"text": "Begin Your Adventure"
}
],
"link_urls": [
{
"website_url": "<WEBSITE_URL>",
"display_url": "<DISPLAY_URL>"
}
],
"titles": [
{
"text": "Level Up"
}
],
"ad_formats": [
"SINGLE_VIDEO"
],
"call_to_action_types": [
"WATCH_MORE"
],
"descriptions": [
{
"text": "Description"
}
],
"asset_customization_rules": [
{
"customization_spec": {
"publisher_platforms": [
"facebook"
],
"facebook_positions": [
"feed",
"instream_video"
]
},
"video_label": {
"name": "labelfb"
}
},
{
"customization_spec": {
"publisher_platforms": [
"instagram"
],
"instagram_positions": [
"stream"
]
},
"video_label": {
"name": "labelig"
}
}
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
範例 — Instagram 探索首頁素材客製化
curl \
-F 'object_story_spec={
"page_id": "<PAGE-ID>",
"instagram_actor_id": "<INSTAGRAM-ID>",
}' \
-F 'asset_feed_spec={
"ad_formats": [
"SINGLE_IMAGE"
],
"asset_customization_rules": [
{
"image_label": {
"name": "<IMAGE-LABEL>"
},
"customization_spec": {
"publisher_platforms": [
"instagram"
],
"instagram_positions": [
"explore_home"
]
}
}
],
"bodies": [
{
"text": "",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
],
"call_to_action_types": [
"LEARN_MORE"
],
"images": [
{
"hash": "<IMAGE-HASH>",
"adlabels": [
{
"name": "adlabel1"
}
]
},
{
"hash": "<IMAGE-HASH>",
"image_crops": {
"100x100": [
[
604,
0
],
[
1659,
1055
]
]
},
"adlabels": [
{
"name": "adlabel2"
}
]
}
],
"link_urls": [
{
"website_url": "",
"display_url": "",
"deeplink_url": "",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
],
"optimization_type": "PLACEMENT",
"titles": [
{
"text": "",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
範例 — Instagram 搜尋結果素材客製化
curl
-F 'object_story_spec={
"page_id": "<PAGE-ID>",
"instagram_actor_id": "<INSTAGRAM-ID>",
}' \
-F 'asset_feed_spec={
"ad_formats": [
"SINGLE_IMAGE"
],
"asset_customization_rules": [
{
"image_label": {
"name": "placement_asset_f1048d832ecd558_1661539731099"
},
"customization_spec": {
"publisher_platforms": [
"instagram"
],
"instagram_positions": [
"ig_search"
]
}
}
],
"bodies": [
{
"text": "",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
],
"call_to_action_types": [
"LEARN_MORE"
],
"images": [
{
"hash": "9ffd7307eae1f9c6e5250fc8760d285f",
"adlabels": [
{
"name": "adlabel1"
}
]
},
{
"hash": "9ffd7307eae1f9c6e5250fc8760d285f",
"image_crops": {
"100x100": [
[
604,
0
],
[
1659,
1055
]
]
},
"adlabels": [
{
"name": "adlabel2"
}
]
}
],
"link_urls": [
{
"website_url": "<WEBSITE_URL>",
"display_url": "<DISPLAY_URL>",
"deeplink_url": "<DEEPLINK_URL>",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
],
"optimization_type": "PLACEMENT",
"titles": [
{
"text": "",
"adlabels": [
{
"name": "adlabel1"
},
{
"name": "adlabel2"
}
]
}
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
針對版位素材客製化廣告,應透過 {ad-account-id}/ads
來擷取 Instagram 相關廣告創意欄位。舉例來說:
https://graph.facebook.com/v21.0
/{ad-account-id}/ads?fields=creative{effective_instagram_story_id,instagram_permalink_url}