إصدار ‏‎Graph API‎‏

GET Custom Audience Ad Accounts

قراءة

مثال

Graph API Explorer
GET /v21.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
}];
إذا كنت تريد التعرف على كيفية استخدام واجهة Graph API، يرجى قراءة ‏دليل استخدام واجهة Graph 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

لمزيد من التفاصيل عن تقسيم الصفحات، يرجى الاطلاع على ‏دليل Graph API‏.

‎Error Codes‎

خطأالوصف
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.

You can share audiences with other ad accounts via the ad_accounts edge.

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 delete to the same endpoint with the ad_accounts 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.

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.