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

Share Creative Folders

Ask a business to share their creative folder by sending a request. Send a POST request to {business-creative-folder-id}/agencies and assign permitted_tasks to MANAGE_CONTENT. You need business_creative_management permission for this action.

Example — The VIEW_INSIGHTS permission is added to view insights for the creative assets in the folder:

curl -X POST \
  -F 'permitted_tasks=['MANAGE_CONTENT','VIEW_INSIGHTS']' \
  -F 'business={partner-business-id} ' \
  -F 'access_token={access-token}' \
     https://graph.facebook.com/<API_VERSION>/<BUSINESS_CREATIVE_FOLDER_ID>/agencies

Response — If a business shared a folder with you, and they accepted a sharing request from you:

{ "success": true }

Response — If the business did not accept a sharing request yet:

{
  "success": true,
  "share_status": "In Progress"
}

See In-Progress Requests

To list all partnership agreements that do not have a response, send a request to {business-id}/received_sharing_agreements and set request_status to IN_PROGRESS. You need business_creative_management permission for this action.

curl -i -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/received_sharing_agreements
     ?request_status=IN_PROGRESS
     &access_token={access-token}"

Accept a Request

You can accept a sharing request by sending a POST to business_sharing_agreement_request_id and set request_status to APPROVE. You only need to do this the first time someone shares a folder with your business.

You need business_management permission for this action:

curl -X POST \
     -F 'request_status=APPROVE' \
     -F 'access_token={access-token}' \
     https://graph.facebook.com/<API_VERSION>/<BUSINESS_SHARING_AGREEMENT_REQUEST_ID>

Response

{ "success": true }

Alternatively, to see pending requests, go to Business Manager Settings > Requests > Received Requests.

Share Folder

If you have an agency or partner create your ads you should share your creative folder. Developers can also build a flow so advertisers can share their folders to another business.

Your app should send a POST request to creative_folder_id/agencies and set the business field to the partner's business ID and permitted_tasks field to MANAGE_CONTENT. You need business_creative_management permission for this action.

Example — Add the VIEW_INSIGHTS permission where your app's users can view the insights for creative assets in the folder:

curl -X POST \
  -F 'permitted_tasks=['MANAGE_CONTENT','VIEW_INSIGHTS']' \
  -F 'business={partner-business-id}' \
  -F 'access_token={access-token}' \
  https://graph.facebook.com/<API_VERSION>/<BUSINESS_CREATIVE_FOLDER_ID>/agencies

Response

{
  "success":true,
  "share_status": "In Progress"
}