我正在尝试使用Facebook Marketing API获取数据。
$api = FacebookAds::init('TOKEN');
$start = Carbon::create(2018,11,16);
$end = Carbon::create(2018,11,16);
$period = Period::create($start,$end);
$in = $api->insights($period,'act_ID', 'ad',[
'fields' => ['impressions', 'objective', 'actions'....]
]);
我正在执行以下每个广告操作:
"actions" => array:10 [▼
0 => array:2 [▼
"action_type" => "comment"
"value" => "1"
]
1 => array:2 [▼
"action_type" => "offsite_conversion.fb_pixel_purchase"
"value" => "1"
]
2 => array:2 [▼
"action_type" => "photo_view"
"value" => "114"
]....
]
我的问题是如何获取每个广告目标网址? 谢谢
答案 0 :(得分:0)
您实际上必须使用AdCreative信息来获取目标网址:https://developers.facebook.com/docs/marketing-api/reference/ad-creative/
我使用object_story_spec并通过ID将AdCreative与广告匹配(它们共享相同的ID)。