获取facebook广告拒绝多个广告的原因
Get facebook ads disapprove reasons for multiple ads
检查给定 ad_groups 列表(ad_group id 列表)的不赞成状态并了解不赞成原因的最佳方式是什么?
最直接但不是最佳的方法是:
1) 获取账户的所有未获批准ad_groups:
params = {
'status': ['DISAPPROVED'],
'limit': 1000
}
adgroup_iter = account.get_ad_groups(params=params)
disapproved_ad_ids = []
for adgroup in adgroup_iter:
disapproved_ad_ids.append(adgroup._data['id'])
2) 从结果列表 select 中,通过交叉列表只有 ad_groups 感兴趣:
ads_of_interest = list(set(ad_ids_to_check) & set(disapproved_ad_ids))
3) 为每个 ad_group 感兴趣的人提出请求,因为它的拒绝原因(adgroup_review_feedback 字段):
for adgroup_id in ads_of_interest:
adgroup = AdGroup(adgroup_id)
print adgroup.remote_read(fields=[AdGroup.Field.adgroup_review_feedback])
糟糕的是我有很多广告 运行 并且单独进行 API 调用以获得每个广告的拒登原因是不好的,因为它只会让我超出Facebook 请求限制。
最终得到了解决方案:
params = {
'adgroup_status': ['DISAPPROVED'],
'limit': 500,
'fields': 'id,adgroup_review_feedback'
}
然后查找结果的交集和 'interesting' 广告列表,丢弃我问题的第 3 段,因为所需的数据已经包含在第 1 段的结果中(感谢@Igy 的回答)
提及 'adgroup_status'
字段名称而不是 'status'
(如我的问题中给出的) - 这解决了错误的 facebook 响应的问题。可能是 Python SDK "Fetching all ads of ad ad account..." 示例中的 documentation 中的拼写错误,因为它在 SDK v.2.2.6
中不起作用
无需单独获取每个广告
您可以在最初获取列表时请求 adgroup_review_feedback
字段以及您感兴趣的其他字段
这是我自己帐户中的示例,已删除 ID:
/v2.2/act_<ACCOUNT_ID>/adgroups
?adgroup_status=['DISAPPROVED']
&fields=id,adgroup_review_feedback
回复:
{
"data": [
{
"id": "<REMOVED>",
"adgroup_review_feedback": {
"TEXT_OVERLAY": "Your ad wasn't approved because it uses too much text in its image or video thumbnail, which doesn't follow Facebook's ad guidelines. Ad images or video thumbnails aren't allowed to include more than 20% text. You'll still be charged for any impressions or clicks your ad received before it was disapproved. You may upload your ad image to see why it is considered 20% text, or visit the Help Center to learn more.If you’ve read the guidelines in the Help Center and think your ad follows the rules and should have been approved, please let us know."
}
},
{
"id": "<REMOVED>",
"adgroup_review_feedback": {
"TEXT_OVERLAY": "Your ad wasn't approved because it uses too much text in its image or video thumbnail, which doesn't follow Facebook's ad guidelines. Ad images or video thumbnails aren't allowed to include more than 20% text. You'll still be charged for any impressions or clicks your ad received before it was disapproved. You may upload your ad image to see why it is considered 20% text, or visit the Help Center to learn more.If you’ve read the guidelines in the Help Center and think your ad follows the rules and should have been approved, please let us know."
}
}
],
"paging": {
"cursors": {
"before": "<REMOVED>==",
"after": "<REMOVED>=="
}
}
}
以问题中的代码为例,这看起来会打印出所有被拒登广告的拒登原因 - 强烈建议不要使用 1000 作为第一次提取的限制,因为您可能会开始看到超时,因为随着时间的推移,帐户会添加很多广告
params = {
'status': ['DISAPPROVED'],
'limit': 1000,
'fields': 'id,adgroup_review_feedback'
}
adgroup_iter = account.get_ad_groups(params=params)
for adgroup in adgroup_iter:
print adgroup(adgroup_review_feedback)
检查给定 ad_groups 列表(ad_group id 列表)的不赞成状态并了解不赞成原因的最佳方式是什么?
最直接但不是最佳的方法是:
1) 获取账户的所有未获批准ad_groups:
params = {
'status': ['DISAPPROVED'],
'limit': 1000
}
adgroup_iter = account.get_ad_groups(params=params)
disapproved_ad_ids = []
for adgroup in adgroup_iter:
disapproved_ad_ids.append(adgroup._data['id'])
2) 从结果列表 select 中,通过交叉列表只有 ad_groups 感兴趣:
ads_of_interest = list(set(ad_ids_to_check) & set(disapproved_ad_ids))
3) 为每个 ad_group 感兴趣的人提出请求,因为它的拒绝原因(adgroup_review_feedback 字段):
for adgroup_id in ads_of_interest:
adgroup = AdGroup(adgroup_id)
print adgroup.remote_read(fields=[AdGroup.Field.adgroup_review_feedback])
糟糕的是我有很多广告 运行 并且单独进行 API 调用以获得每个广告的拒登原因是不好的,因为它只会让我超出Facebook 请求限制。
最终得到了解决方案:
params = {
'adgroup_status': ['DISAPPROVED'],
'limit': 500,
'fields': 'id,adgroup_review_feedback'
}
然后查找结果的交集和 'interesting' 广告列表,丢弃我问题的第 3 段,因为所需的数据已经包含在第 1 段的结果中(感谢@Igy 的回答)
提及 'adgroup_status'
字段名称而不是 'status'
(如我的问题中给出的) - 这解决了错误的 facebook 响应的问题。可能是 Python SDK "Fetching all ads of ad ad account..." 示例中的 documentation 中的拼写错误,因为它在 SDK v.2.2.6
无需单独获取每个广告
您可以在最初获取列表时请求 adgroup_review_feedback
字段以及您感兴趣的其他字段
这是我自己帐户中的示例,已删除 ID:
/v2.2/act_<ACCOUNT_ID>/adgroups
?adgroup_status=['DISAPPROVED']
&fields=id,adgroup_review_feedback
回复:
{
"data": [
{
"id": "<REMOVED>",
"adgroup_review_feedback": {
"TEXT_OVERLAY": "Your ad wasn't approved because it uses too much text in its image or video thumbnail, which doesn't follow Facebook's ad guidelines. Ad images or video thumbnails aren't allowed to include more than 20% text. You'll still be charged for any impressions or clicks your ad received before it was disapproved. You may upload your ad image to see why it is considered 20% text, or visit the Help Center to learn more.If you’ve read the guidelines in the Help Center and think your ad follows the rules and should have been approved, please let us know."
}
},
{
"id": "<REMOVED>",
"adgroup_review_feedback": {
"TEXT_OVERLAY": "Your ad wasn't approved because it uses too much text in its image or video thumbnail, which doesn't follow Facebook's ad guidelines. Ad images or video thumbnails aren't allowed to include more than 20% text. You'll still be charged for any impressions or clicks your ad received before it was disapproved. You may upload your ad image to see why it is considered 20% text, or visit the Help Center to learn more.If you’ve read the guidelines in the Help Center and think your ad follows the rules and should have been approved, please let us know."
}
}
],
"paging": {
"cursors": {
"before": "<REMOVED>==",
"after": "<REMOVED>=="
}
}
}
以问题中的代码为例,这看起来会打印出所有被拒登广告的拒登原因 - 强烈建议不要使用 1000 作为第一次提取的限制,因为您可能会开始看到超时,因为随着时间的推移,帐户会添加很多广告
params = {
'status': ['DISAPPROVED'],
'limit': 1000,
'fields': 'id,adgroup_review_feedback'
}
adgroup_iter = account.get_ad_groups(params=params)
for adgroup in adgroup_iter:
print adgroup(adgroup_review_feedback)