我无法从 API(特别是 Python API)中找到如何执行此操作的任何文档或其他示例。所有文档均涉及通过 Power Editor 或 Ad Manager 上传自定义受众 .csv。有没有其他人遇到过这个?
问问题
486 次
1 回答
1
https://developers.facebook.com/docs/marketing-api/reference/custom-audience https://developers.facebook.com/docs/marketing-api/reference/custom-audience/users/
from facebookads.objects import CustomAudience
audience = CustomAudience(parent_id='act_<AD_ACCOUNT_ID>')
audience[CustomAudience.Field.subtype] = CustomAudience.Subtype.custom
audience[CustomAudience.Field.name] = 'My new CA'
audience[CustomAudience.Field.description] = 'People who bought on my website'
audience.remote_create()
然后:
from facebookads.objects import CustomAudience
audience = CustomAudience('<CUSTOM_AUDIENCE_ID>')
users = ['test1@example.com', 'test2@example.com', 'test3@example.com']
audience.add_users(CustomAudience.Schema.email_hash, users)
于 2016-03-17T20:31:56.610 回答