Я пытаюсь получить все рекламные аккаунты через Facebook Ads SDK.Я получаю следующую ошибку
Вот мой код.
public function getAdAccounts() {
$user = new AdAccountUser('**************');
$user->read(array(AdAccountUserFields::ID));
$accounts = $user->getAdAccounts();
// Print out the accounts
echo "Accounts:\n";
foreach($accounts as $account) {
echo $account->id . ' - ' .$account->name."\n";
}
// Grab the first account for next steps (you should probably choose one)
$account = (count($accounts)) ? $accounts->getObjects()[0] : null;
echo "\nUsing this account: ";
echo $account->id."\n";
}
Я пробовал через проводник , и он работает.