-
Notifications
You must be signed in to change notification settings - Fork 516
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
Create AdAccount #89
Comments
Hi @alexkappa, Through the API, only accounts owned by a business (not a user) can be created. Despite we are working on it, the SDK doesn't yet support the business manager API objects. If you need to access that endpoint i suggest you temporary create the account through a direct API call (you i'll be able to read and update the account through the AdAccount class).
Note: i haven't tested this code :) |
Thanks @pruno, we'll work around it for the time being and will be looking forward to having support for business manager objects in the SDK. Cheers! |
Quick note for anyone who stumbles upon this issue. The example uses If you search the facebook docs (https://developers.facebook.com/docs/marketing-api/reference/ad-account) you will find two sets of documentation: |
It is possible to create the user uses AdAccount? My code: $fieldsRequired = [
'name' => 'My Ad Account',
'currency' => 'USD',
'timezone_id' => 7,
];
$accounts = $fb->post('/me/adaccounts', $fieldsRequired);
Where am I going wrong? It is obligatory to have the BUSINESS_ID instead of /me?
cURL Log
Sorry my English! |
@alexkappa Solve this problem of creating Account? |
@newerton Did you solve this? I can't create with my business id too... |
@happierall Without solution. In my case, I direct the client to Facebook Ads, automatically creates the account for the user. My project is stopped. I was using version 2.6. Today it is in version 2.9, and did not solve this problem. In the documentation, it would have to work. |
I found solution. You need application with Standart Access. Not basic, not
development
…On Tue, 27 Jun 2017 at 20:24, Newerton ***@***.***> wrote:
@happierall <https://github.com/happierall> Without solution. In my case,
I direct the client to Facebook Ads, automatically creates the account for
the user.
My project is stopped. I was using version 2.6. Today it is in version
2.9, and did not solve this problem.
In the documentation, it would have to work.
Https://developers.facebook.com/docs/marketing-api/reference/ad-account#Creating
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACZ7TUGP1zkStx8UUkt5PjQeIgQ5_8OAks5sITrDgaJpZM4EelBD>
.
|
The code below should be implemented. Using the user session. $fieldsRequired = [
'name' => 'My Ad Account',
'currency' => 'USD',
'timezone_id' => 7,
];
$accounts = $fb->post('/me/adaccounts', $fieldsRequired); |
(#275) Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects. |
Hello,
I was wondering why ad accounts cannot be created using the SDK.
From the API documentation it seems allowed to create an ad account but in the SDK the AdAccount class uses the
CannotCreate
trait.Thanks,
Alex
The text was updated successfully, but these errors were encountered: