Как стать счастливее и уверенно идти к своим целям? Все ответы — в книге «Сам себе государство. Как совершить революцию в жизни». Купить Support - Business Management APIs - Documentation - Facebook for Developers


Use this support for troubleshooting and FAQs.

This error usually means you need to:

  1. Get business_management, ads_management, and standard tier access for your app.
  2. Mark your app as a non-development app.
  3. Apply for App Review for the app to use the APIs.

Without standard-tier access, you can't use certain features of the Marketing APIs.

curl -i -X GET \
 "https://graph.facebook.com/<API_VERSION>/<extended credit line id>?fields=receiving_business&access_token=<access_token>"

Each child Business Manager will have a unique allocation config whose ID you can extract from the API call above. Now use the allocation config ID in the API call below:

curl -i -X POST \
  -d “amount=<amount>” \ 
  "https://graph.facebook.com/<API_VERSION>/<allocation config id>?fields=access_token=<access token> "

Alternatively, you can just delete the config and create a new one:

curl -i -X DELETE \
 "https://graph.facebook.com/<API_VERSION>/<allocation config id>?fields=access_token=<Access_token> "
GET  <graph>/<API_VERSION>/<BUSINESS_ID>/owned_businesses?client_user_id=<app_scoped_user_id>
  "error": {
    "message": "(#10) You do not have permission to perform this action. This action requires that you can MANAGE_PERMISSIONS for this business account.",
    "type": "OAuthException",
    "code": 10,
    "fbtrace_id": "alphanumeric string"

Most likely the access token you used is not an admin of the parent Business Manager. You should not use the client’s user access token or the child Business Manager admin system user token.

  "error": {
    "message": "The Facebook Page you've tried to add is already owned by another Business Manager. You can still request access to this Page, but your request will need to be approved by the Business Manager that owns it.",
    "type": "OAuthException",
    "code": 3918,
    "error_subcode": 1690024,
    "is_transient": false,
    "error_user_title": "Facebook Page Already Belongs to a Business",
    "error_user_msg": "The Facebook Page you've tried to add is already owned by another business. You can still request access to this Page, but your request will need to be approved by the business that owns it.",
    "fbtrace_id": "alphanumeric string"

The primary page has already been set on another Business Manager. It could be that the page has been set on a user’s Business Manager or is connected to an Instagram profile. To solve this, you can use the shared_page_id field when creating the business or updating the business.

Currently, we only support a line of credit payment method for this setup via the API.

  1. Create a child Business Manager and ad account.
  2. Add the user to the Business Manager or ad account as a Finance Editor or admin.
  3. Send the user to the UI for the ad account or Business Manager.
  4. Ask the user to manually enter the credit card.

We recommend storing information associated with the user, including:

  • Child Business Manager ID, created with the `/business_id/owned_businesses` endpoint
  • Child Business Manager Admin system user token, created with the `child_bm/access_token` endpoint

This recommendation makes it easier to manage and reduces overhead.

  1. Log in to your app dashboard.
  2. Add a test user with http://developers.facebook.com/apps/app_id/roles/test-users/?business_id=bmid (Replace `bmid` and `app_id` with actual IDs)
  3. Click Edit and generate and access token with the 'business_management' and 'ads_management' permissions.
  4. Generate an access token for that test user by clicking Edit > Get an access token for this test user.
  5. Create a Facebook page or use one that already exists for testing.
  6. Add this newly created user as an admin to that test page:
    • Go to https://www.facebook.com/page_id/settings/?tab=admin_roles (Replace `page_id` with an actual page ID)
    • Click Assign a new Page role
    • Select Page Admin.
  7. Now use the test user in the API calls.

Yes. A user can be associated with more than one child Business Manager per partner. Each existing child under the partner must have an assigned primary page.

Yes, the parent Business Manager can grant access to a user if they choose to do so.

While your app is waiting for business_management, ads_management, and Ads Management Standard Access permissions, you can still test end-to-end:

  1. Go to the App dashboard.
  2. Go to Roles > Test Users.
  3. Click Add to create a new test user.
  4. Mark Authorize Test Users for This App? as yes.
  5. In Login Permissions, add `ads_management` and `business_management` to the list of permissions.
  6. Click Create Test User.
  7. Once created, click Edit next to the user and select Get an access token for this test user. You can use this test user to replicate a client.
  8. You need your app to be approved first to make the API calls.

You must meet these prerequisites:

  • Your app is a standard tier App.
  • The child Business Managers should own the ad accounts that roll up into the parent Business Manager.
  • Any ad account directly under the parent Business will also send out Webhook notifications.

To set up a Heroku server that listens for notifications on Webhooks:

  1. Create an account on Heroku. Any other server should also work.
  2. Deploy the `webhooks_test` code to the Heroku server.
  3. For Heroku, in the Setting session, set up the Config Variables. You can get `APP_SECRET` from your Facebook App dashboard. You need this to verify that an update came from a Facebook server. `VERIFY_TOKEN` is your password to set up a Webhooks subscription.
  4. Add the Webhooks to your app by visiting **https://developers.facebook.com/apps/{app_id}/webhooks/**.
  5. From the selector, select Application, and click Subscribe to the topic.
  6. Use the Webhook address and input the `VERIFY_TOKEN` that you set.
  7. Find the `ad_account` and subscribe to it.
  8. You can now make a test call through the Webhook UI.

You can either delete the allocation config of the shared extended credit and create a new one or modify the existing one. The allocation config ID is the ID returned at the time of sharing the LOC. You alternatively can fetch it via the API later with this API call that returns allocation config IDs for the extended credit.