I am building a PHP script based on Facebook Marketing API,
The API system works fine,
I can get the result for the campaigns, the ads, and full insights as well.
But, I want to get the result of the leads.
Note (1): I got admin access to the APP, the Ad account, and the page as well,
Note (2): App Status: In Development
Note (3) : I send the API request for "leads_retrieval" and "leads_retrieval",
$permissions = ['email','public_profile','leads_retrieval','ads_management', 'ads_read', 'business_management', 'read_audience_network_insights', 'read_insights', 'manage_pages', 'pages_show_list', 'pages_manage_cta','pages_manage_instant_articles', 'publish_pages', 'read_page_mailboxes'];
My Code to get the lead result :
$ad = new Ad('<AD_ID>');
$leads = $ad->getLeads();
$lead = $leads->getResponse()->getBody();
print_r($lead);
Result:
{"data":[]}
So for some reason, I still get the incorrect empty result for the leads!
Any idea about how to get the correct lead result for the Ad?
Reference : https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving/v2.9