如何检索大量的DELETED广告系列,广告集,广告? [英] How can I retrieve a large number of DELETED Campaigns, Adsets, Ads?

查看:138
本文介绍了如何检索大量的DELETED广告系列,广告集,广告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图从与我们的业务经理相关联的各个帐户中检索所有广告系列,广告集和广告.

I'm trying to retrieve all Ad Campaign, Adsets and Ads from various accounts associated with our Business Manager.

我正在访问的特定端点是:

https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/campaigns
https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/adsets
https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/ads

The specific endpoints that I'm accessing are:

https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/campaigns
https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/adsets
https://graph.facebook.com/v2.8/act_xxxxxxxxxxxxx/ads

当我使用filter参数为所有广告系列查询这些帐户的一些时,

When I query some of these accounts for all Campaigns using the filter parameter,

[{'operator': 'IN',
        'field': 'ad.effective_status',
        'value': [
            'ACTIVE',
            'PAUSED',
            'DELETED',
            'PENDING_REVIEW',
            'DISAPPROVED',
            'PREAPPROVED',
            'PENDING_BILLING_INFO',
            'CAMPAIGN_PAUSED',
            'ARCHIVED',
            'ADSET_PAUSED']}]

Facebook API始终返回此错误:

the Facebook API always returns this error:

{"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}}

问题排查

  • 我为filter参数使用了各种值,例如1、25、50、100、500.
  • 我尝试使用date_preset参数限制日期(这似乎无关紧要).
  • 我尝试通过将{'operator': 'IN','field':'campaign.id','value':['xxxxxxxxxxxxx']}作为附加过滤器包含在filter参数中来筛选单个广告系列来限制查询.
  • 我尝试了批处理请求并查询了/insights端点,但是我还没有任何工作.
  • Troubleshooting

    • I've used various values for the filter parameter such as 1, 25, 50, 100, 500.
    • I've tried limiting the date using the date_preset parameters (this seems irrelevant).
    • I've tried limiting the queries by filtering down to individual campaigns by including {'operator': 'IN','field':'campaign.id','value':['xxxxxxxxxxxxx']} as an additional filter in the filter parameter.
    • I've attempted batch requests and querying the /insights endpoint, but I haven't had one work yet.
    • 当我在过滤器中仅包含ACTIVE个广告系列时,该查询有效.这使我可以推断DELETED广告系列是问题所在.换句话说,这些帐户有大量的DELETED广告系列.

      When I only include ACTIVE campaigns in the filter, the query works. This has allowed me to deduce that the DELETED campaigns are the problem. In other words, these accounts have a ton of DELETED campaigns.

      我正在使用Postman版本5.0.0(5.0.0)发出请求.

      I'm making my requests using Postman Version 5.0.0 (5.0.0).

      我想如果我能弄清楚如何获得广告系列,那么广告集和广告将是相似的.我该如何解决这个问题?

      I imagine if I can figure out how to get the Campaigns, the Adsets and Ads will be similar. How do I go about resolving this?

      推荐答案

      原因是该API实际上并不支持查询某些终结点的已删除对象.我尝试获取某个帐户的所有广告系列,这就是响应.

      The reason is that the API does not actually support querying for deleted objects for certain endpoints. I tried to obtain all campaigns for a certain account and this is the response.

      Method:  GET
      Path:    
      https://graph.facebook.com/v2.10/act_XXXX/campaigns
      Params:  {'effective_status': '["ACTIVE","PAUSED","DELETED","ARCHIVED"]', 'fields': 'id,name,status', 'summary': 'true'}
      
      Response:
      {
        "error": {
          "code": 100, 
          "is_transient": false, 
          "error_subcode": 1815001, 
          "error_user_msg": "Requesting for deleted objects is not supported in this endpoint.", 
          "error_user_title": "Cannot Request for Deleted Objects", 
          "message": "Invalid parameter", 
          "type": "OAuthException", 
          "fbtrace_id": "FYDwMABcwxj"
        }
      }
      

      查看文档后,我发现了这一点 https://developers.facebook.com/docs/marketing-api/最佳做法/storing_adobjects

      After looking at the documentation I discovered this https://developers.facebook.com/docs/marketing-api/best-practices/storing_adobjects

      他们在这里声明

      如果保留已删除的对象ID,则可以继续检索 通过单独查询对象ID来获取统计信息或对象详细信息. 但是,您无法将已删除的对象检索为连接对象 来自未删除的节点/对象.

      If you keep the deleted object id, you can continue to retrieve the stats or object details by individually querying the object ID. However you cannot retrieve the deleted objects as a connection object from a non deleted node/object.

      这篇关于如何检索大量的DELETED广告系列,广告集,广告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆