以下是我用于检索销售线索的代码,如果我从facebook业务经理检查并从所有筛选器中选择所有时间都超过300的广告,则URL中的ID是具有300多个销售线索的广告ID -facebook线索
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/'.$adID.'/leads?fields=id%2Cad_id%2Cad_name%2Cadset_id%2Cadset_name%2Ccampaign_id%2Ccampaign_name%2Ccreated_time%2Ccustom_disclaimer_responses%2Cfield_data%2Cform_id%2Chome_listing%2Cis_organic%2Cpartner_name%2Cplatform%2Cpost%2Cretailer_item_id%2Cvehicle&limit=1000', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
$this->session->set_flashdata('error', 'Graph returned an error: ' . $e->getMessage());
echo 'Graph returned an error: ' . $e->getMessage();exit;
//redirect("dashboard");
} catch(Facebook\Exceptions\FacebookSDKException $e) {
$this->session->set_flashdata('error', 'Facebook SDK returned an error: ' . $e->getMessage());
echo 'Facebook SDK returned an error: ' . $e->getMessage();exit;
//redirect("dashboard");
}
$fbReturnedRecords = $response->getDecodedBody();
以下是打印api清除结果的网址
https://autolinkme.com/facebook_marketing/leads/23843534983570069