dongzao3923 2017-03-09 17:29
浏览 58
已采纳

获取不再运行的广告的Facebook广告洞察

I am trying to get insights for ongoing and past Ads.

Using graph api

$fields2=array('fields' => 'cpc,clicks,impressions,actions,spend,reach,video_p100_watched_actions,video_p25_watched_actions,video_p50_watched_actions,video_p75_watched_actions,video_p95_watched_actions,video_avg_percent_watched_actions',
'time_increment' => "1",
'access_token'=>$token);
 $fields2=http_build_query($fields2);
 $curl2 = curl_init();
 curl_setopt_array($curl2, array(
                   CURLOPT_RETURNTRANSFER => 1,
                   CURLOPT_URL => "https://graph.facebook.com/v2.8/$AD_ID/insights/?$fields2"
                   ));

After giving it an Ad ID I get all the metrics that I want, unless an AD is no longer running.

For all Ads that are no longer running, all I get is this

{
  "data": [
  ]
}

Is there a way to get insights for Ads that are no longer running? If so, which fields do I need to add?

  • 写回答

1条回答 默认 最新

  • 普通网友 2017-03-09 19:14
    关注

    Solution was to add an extra parameter:

    'time_range' => "{'since':'2015-01-01', 'until':'2020-01-01'}"
    

    ...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探