facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
818 stars 514 forks source link

CampaignFields::SPEND_CAP return null for all campaigns, help-me!! #487

Closed carlosbuzato closed 5 years ago

carlosbuzato commented 5 years ago

Hi, i'm trying return SPEND_CAP value for my campaigns, but all of then are returning null. Take a look on the following code:

`$fields = array( CampaignFields::NAME, CampaignFields::OBJECTIVE, CampaignFields::SPEND_CAP, );

$AdAccount = new AdAccount(); $cursor = $AdAccount->getCampaigns($fields);

foreach ($cursor as $campaigns) { dump($campaigns->{CampaignFields::NAME}.PHP_EOL); dump($campaigns->{CampaignFields::OBJECTIVE}.PHP_EOL); dump($campaigns->{CampaignFields::SPEND_CAP}.PHP_EOL); }

$cursor->fetchAfter();`

What is the possible solution for this problem?

jingping2015 commented 5 years ago

Did you try with curl API call? If the curl API call have same result, it means this is a API bug, please report the issue on Devsite Bug Report channel: https://developers.facebook.com/support/bugs/ Thanks!

carlosbuzato commented 5 years ago

Did you try with curl API call? If the curl API call have same result, it means this is a API bug, please report the issue on Devsite Bug Report channel: https://developers.facebook.com/support/bugs/ Thanks!

Thanks man!