簡體   English   中英

如何使 Facebook API 批處理請求變為異步

[英]How to make Facebook API batch request into async

這作為發布到https://graph.facebook.com的批處理請求工作正常,使用以下作為“batch=' 參數,但如何使其成為異步請求?

[{                                                                      
  "method": "GET",
  "relative_url": "v11.0/act_xxxxxx/insights?fields=account_id%2Caccount_name..."
},
{
  "method": "GET",
  "relative_url": "v11.0/act_yyyyyy/insights?fields=account_id%2Caccount_name..."
}]

我嘗試發布到https://graph.facebook.com/v11.0/act_xxxxxx/async_batch_requests ,但結果不是異步的,並且結果在請求結果中同步返回。

我還沒有嘗試過,但是這里的文檔: https : //developers.facebook.com/docs/marketing-api/insights/best-practices#asynchronous建議您:

  • /insights POST調用以獲取report_run_id
  • GET調用/:report_run_id直到得到async_status: "Job Completed"async_percent_completion: 100
  • /:report_run_id/insights GET調用以獲取結果

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM