New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid parameter on Ad creation #362
Comments
I think you might be missing
Also
And they usually contain more verbose information. |
Is this issue solved?? because i have same trouble.. |
I haven't been able to try it myself yet, as we removed the feature connected to this issue from our application. Although you should give it a shoot. I've learned from working with the other parts of the API, that most issues can be resolved by making the same calls with different parameters ;) Good luck :) |
I got the same message. The methods Is it not the case to change the behavior of BTW, I'm unable to locate in the documentation how to handle errors. It is useful mainly because Facebook API errors are not as usual. |
Hi, it seems like this issue has been open for more than a few months now. We have made many changes in the SDK since then, including releasing a new version. If you can repro your specific issue with the latest version of the SDK, please create a new issue or comment here with further details. |
Hi!
I'm getting an "invalid parameter"-error in this part of the example code, rest of the code for creation of campaign, adset, creative, etc. should be working as they are generating their ids.
`use FacebookAds\Object\Ad;
use FacebookAds\Object\Fields\AdFields;
try {
$ad = new Ad(null, $account->id);
$ad->setData(array(
AdFields::CREATIVE => array('creative_id' => $creative->id),
AdFields::NAME => 'hello world',
AdFields::ADSET_ID => $adset->id,
));
$ad->create();
echo 'Ad ID:'.$ad->id."\n";
}
catch (Exception $e) {
echo 'Error message: ' .$e->getMessage() ."\n" . "
";
echo 'Error Code: ' .$e->getCode() ."
";
}`
Grateful for any suggestions :)
PS. I'm using a sandbox ad account.
The text was updated successfully, but these errors were encountered: