그래프 API 버전

Custom Audience Adaccounts

Sharing Audiences

This endpoint allows you to share audiences to other ad accounts.

When a Custom Audience is shared between parties, a partnership relationship must first be established between the Business Managers. This is in the Partners section of Business Settings in Business Manager. The party sharing the audience must also affirm their compliance with our Custom Audience terms of service provided in Business Manager, see Facebook, Custom Audience Terms.

Once established, a sharing relationship enables a business to share audiences with another Business Manager. However, audiences can only be shared in one direction. This means the audience is shared from Business #1 to Business #2. Business #2 will not be able to share audiences back to Business #1 unless a separate sharing relationship from Business #2 to #1 is established.

Starting from July 2, 2018 in order to share a Custom Audience between Business Managers, such businesses should establish an audience sharing relationship as follows. You need Business Manager admin permission to request a relationship to share an audience. If two Business Managers have already established the relationship, then an advertiser can directly share the audience with the other business. For detailed instructions, see Business Assets, Sharing Custom Audiences between Business Managers.

읽기

Graph API Explorer
GET /v19.0/{custom-audience-id}/adaccounts HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{custom-audience-id}/adaccounts',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{custom-audience-id}/adaccounts",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{custom-audience-id}/adaccounts",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{custom-audience-id}/adaccounts"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
그래프 API를 사용하는 방법을 알아보려면 그래프 API 사용 가이드를 읽어보세요.

매개변수

매개변수설명
permissions
string

Optional permission filter for the shared ad account IDs. Values can be targeting for getting account IDs with only targeting permissions, or targeting_and_insights to get account IDs with both targeting and insights permissions.If not set, it will return all shared ad account IDs.

필드

이 에지로부터 읽는 경우 JSON 형식의 결과를 반환합니다:

{ "data": [], "paging": {} }

data

CustomAudienceAdAccount 노드 리스트.

paging

페이지 매김에 대한 자세한 정보는 그래프 API 가이드를 확인하세요.

오류 코드

오류설명
100Invalid parameter

만들기

To share audiences with other ad accounts, a business must claim the owner ad account and recipient ad accounts.

The recipient ad account can include or exclude the shared custom audience in targeting spec. Optionally, the recipient ad account can also have the access to view the audience insights with the insights tool. If the optional permissions parameter is not set, the default is targeting_and_insights.

The destination account cannot modify the audience or use it as a seed audience to create lookalikes.

이 엔드포인트에서 수행할 수 없는 작업입니다.

업데이트 중

이 엔드포인트에서 수행할 수 없는 작업입니다.

삭제 중

You can also unshare an audience with an ad account by specifying an HTTP DELETE to the same endpoint with the adaccounts field set to the ad account you want to remove access. Any existing ads running from these accounts using this audience will be stopped and cannot be restarted.

이 엔드포인트에서 수행할 수 없는 작업입니다.