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

Which ID do I use ? #3

Closed
chrisamoore opened this issue Jun 18, 2014 · 5 comments
Closed

Which ID do I use ? #3

chrisamoore opened this issue Jun 18, 2014 · 5 comments

Comments

@chrisamoore
Copy link

I am using a user id in my campaign creation like so: (All permissions granted etc. on my App and user. )

//    $session = new FacebookSession($variantSpec->account->token);
    $session = FacebookSession::newAppSession(Config::get('facebook.app_id'),Config::get('facebook.app_secret'));

    $api = new Api($session);
    $campaign  = new AdCampaign(null, $user->ad_account_id);

and I get the following error form both attempts:

  • The global ID XXX is not allowed. Please use the application specific ID instead.

So where do I get the Application Specific ID

I tried passing in the same Config::get('facebook.app_id')

thanks in advance

@cordoval
Copy link
Contributor

do you have a trace for this, try to obfuscate the folders a bit but would be useful to see it

@paulbain
Copy link
Contributor

The exception is not from the SDK but from the Ads API.

You need to use the correct parent of the AdCampaign. Please see the documentation here to see:
https://developers.facebook.com/docs/reference/ads-api/adcampaign/

You see that these are created relative to the Ad Account ID which is not a member of the User object.

See:
https://github.com/facebook/facebook-php-ads-sdk/blob/master/examples/adgroup_creation.php

@chrisamoore
Copy link
Author

@paulbain so the act_XXX would be the one ?

@paulbain
Copy link
Contributor

Yes that's the one.

@chrisamoore
Copy link
Author

Yup. Thanks 👍

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

3 participants