Skip to content
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

While create adset then I got error 'Invalid parameter' #52

Closed
anillabs opened this issue Dec 9, 2014 · 4 comments
Closed

While create adset then I got error 'Invalid parameter' #52

anillabs opened this issue Dec 9, 2014 · 4 comments

Comments

@anillabs
Copy link

anillabs commented Dec 9, 2014

Hello,
I am using FB Ads API, and successfully created campaigns and get the ID from Facebook. In the next step to create adset with below code then got error.

// Call create using an array of parameters.
$data = array(
AdSetFields::NAME => 'My AdSet',
AdSetFields::BID_TYPE => 'CPC',
AdSetFields::BID_INFO => array(
'CLICKS' => 500,
),
AdSetFields::CAMPAIGN_STATUS => AdSet::STATUS_ACTIVE,
AdSetFields::DAILY_BUDGET => 200,
AdSetFields::CAMPAIGN_GROUP_ID => $campaign_id,
AdSetFields::TARGETING => array(
'geo_locations' => array(
'countries' => array(
'US',
'GB',
),
),
),
);
$ad_set = new AdSet(null, $account->id);
$ad_set->create($data);

Fatal error: Uncaught exception 'FacebookAds\Http\Exception\AuthorizationException' with message 'Invalid parameter' in /www/facebookads/src/FacebookAds/Http/Exception/RequestException.php:129

@anillabs
Copy link
Author

anillabs commented Dec 9, 2014

Hi All, I got solution for this error,
DAILY_BUDGET - increased upto 4000 then it is converted to INR 40.00
then I created adset successfully

@paulbain
Copy link
Contributor

paulbain commented Dec 9, 2014

glad you found the problem. In the latest version of the SDK there should be a better error message provided in the exception. It's not a tagged version however so you'd have to use master.

@paulbain paulbain closed this as completed Dec 9, 2014
@idanhen
Copy link

idanhen commented Oct 27, 2015

thanks for posting this issue.

version 2.5 still have the same error.

@gnumoksha
Copy link

In 2.11.* version this message is still the same, unfortunately. See #362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants