我试图在创建Facebook Dynamic Ads时尝试使'image_overlay_spec'工作。我已经获得了实际广告本身工作的模板,但是我也希望能够在图像之上提供信息。
object_story_spec: JSON.stringify({
page_id: process.env.FB_PAGE_ID,
template_data: {
description: '{{product.description}}',
link: 'REDACTED',
name: '{{product.name | titleize}}',
},
}),
image_overlay_spec: JSON.stringify({
text_template_tags: ['{{product.price}}'],
text_type: 'price',
theme_color: 'background_e50900_text_fffff',
}),
这就是我现在拥有的。Object_story_spec按预期工作,但是Image_overlay_spec不进行。API没有关于如何使其工作的具体示例。
找到它!
object_story_spec: JSON.stringify({
page_id: process.env.FB_PAGE_ID,
template_data: {
description: '{{product.description}}',
link: 'redacted',
name: '{{product.name | titleize}}',
},
image_overlay_spec: JSON.stringify({
overlay_template: 'pill_with_text',
text_font: 'droid_serif_regular',
text_type: 'price',
position: 'top_right',
theme_color: 'background_e50900_text_fffff',
float_with_margin: 'true',
}),
}),