在Power Editor中,在创建广告(基于流量的广告系列)时,可以选择编辑"标题"和"新闻Feed链接说明" (附上截图)。我在Creative API中找不到相应的字段。 我可以添加链接和消息。
以下是示例代码:
link_data = AdCreativeLinkData()
link_data[AdCreativeLinkData.Field.message] = row['Message']
link_data[AdCreativeLinkData.Field.link] = row['Link']
link_data['Headline'] = row['Headline'] # <<<< NOT AVAILABLE
link_data['News Feed'] = row['News_feed'] # <<<< NOT AVAILABLE
link_data[AdCreativeLinkData.Field.image_hash] = img_hash
object_story_spec = AdCreativeObjectStorySpec()
object_story_spec[AdCreativeObjectStorySpec.Field.page_id] = config['page_id']
object_story_spec[AdCreativeObjectStorySpec.Field.link_data] = link_data
creative = AdCreative(parent_id=ad_account_id)
creative[AdCreative.Field.name] = 'AdCreative for Link Ad'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()
print(creative)
答案 0 :(得分:3)
我发现以下字段会影响标题和新闻Feed:
class MyCollection {
Items menuItems;
...
public Iterator createIterator() {
return new Iterator(menuItems);
}
}
class Client {
public someMethod() {
Iterator iterator = collection.createIterator();
while(iterator.hasNext()) { //doSomething }
// Client is calling iterator's method directly
}
}