尝试通过python代码创建动态广告时,显示错误 “您的产品集无法加载。由于隐私原因,可能不存在或无法访问。”
但是我使用相同的产品集通过facebook ads manager(UI)创建动态广告。
story = AdCreativeObjectStorySpec()
story[story.Field.page_id] = params['fb_page_id']
story[story.Field.template_data] = {
'message': 'Test {{product.name | titleize}}',
'link': params['shortlyst_campaign_url'],
'name': 'Headline {{product.price}}',
'description': 'Description {{product.description}}',
}
creative = AdCreative(parent_id=params['account_id'])
creative[AdCreative.Field.name] = 'Dynamic Ad Template Creative Sample'
creative[AdCreative.Field.object_story_spec] = story
creative[AdCreative.Field.product_set_id] = params['product_set_id']
creative.remote_create()