2017-06-27 9 views
0

タスク

私は、ビジネスマネージャーに関連付けられたさまざまなアカウントからすべての広告キャンペーン、広告セット、広告を取得しようとしています。問題 DELETED Campaigns、Adsets、Adsの多数を取得するにはどうすればよいですか?

私がアクセスしてる特定のエンドポイント

は以下のとおりです。

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パラメータを使用して、すべてのキャンペーンのために、これらのアカウントの一部を問い合わせます、

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

FacebookのAPIは、常にこのエラーを返す:

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

トラブル

  • Iは、1、25、50、100、500
  • として filterパラメータの様々な値を使用しました
  • 私はdate_presetパラメータを使用して日付を制限しようとしました(これは無関係です)。
  • filterパラメータに追加のフィルタとして{'operator': 'IN','field':'campaign.id','value':['xxxxxxxxxxxxx']}を含めることで、個別のキャンペーンに絞り込んでクエリを制限しようとしました。
  • バッチリクエストを試みて、/insightsエンドポイントを照会しましたが、まだ1つの作​​業がありませんでした。

    私は唯一のフィルタでACTIVEキャンペーンを含める詳細その他

、クエリが動作します。これにより、DELETEDキャンペーンが問題であると推測できました。つまり、これらのアカウントのキャンペーン数はDELETEDです。

私はPostmanバージョン5.0.0(5.0.0)を使用してリクエストしています。

私はキャンペーンの入手方法を理解できれば、Adsetsと広告は似ています。これを解決するにはどうすればいいですか?

答えて

1

APIは、特定のエンドポイントで削除されたオブジェクトのクエリを実際にサポートしていないためです。特定のアカウントのすべてのキャンペーンを取得しようとしましたが、これがレスポンスです。

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/best-practices/storing_adobjects

を発見し、ここで彼らは

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.

を述べます
関連する問題