إصدار ‏‎Graph API‎‏

Business Ad Studies

قراءة

This business owns these ads-related studies. Includes lift studies, split tests and so on.

مثال

Graph API Explorer
GET /v21.0/{business-id}/ad_studies 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(
    '/{business-id}/ad_studies',
    '{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(
    "/{business-id}/ad_studies",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-id}/ad_studies",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-id}/ad_studies"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
إذا كنت تريد التعرف على كيفية استخدام واجهة Graph API، يرجى قراءة ‏دليل استخدام واجهة Graph API‏.

المعلمات

لا تحتوي نقطة النهاية هذه على أي معلمات.

الحقول

ستؤدي القراءة من عنصر الربط هذا إلى نتيجة بتنسيق JSON:

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

data

قائمة عُقد ‏‎AdStudy‎‏.

paging

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

‎Error Codes‎

خطأالوصف
200Permissions error
100Invalid parameter
190Invalid OAuth 2.0 Access Token

إنشاء

‎You can make a POST request to ad_studies edge from the following paths:
‎When posting to this edge, an AdStudy will be created.‎

المعلمات

معلمةالوصف
cells
list<Object>

Describes the cells in the study.

مطلوب
description
string

id
int64

name
string

creation_template
enum {AUTOMATIC_PLACEMENTS, BRAND_AWARENESS, FACEBOOK, FACEBOOK_AUDIENCE_NETWORK, FACEBOOK_INSTAGRAM, FACEBOOK_NEWS_FEED, FACEBOOK_NEWS_FEED_IN_STREAM_VIDEO, IN_STREAM_VIDEO, INSTAGRAM, MOBILE_OPTIMIZED_VIDEO, PAGE_POST_ENGAGEMENT, REACH, TV_COMMERCIAL, TV_FACEBOOK, VIDEO_VIEW_OPTIMIZATION, LOW_FREQUENCY, MEDIUM_FREQUENCY, HIGH_FREQUENCY}

adaccounts
list<int64>

adsets
list<numeric string or integer>

campaigns
list<numeric string or integer>

control_percentage
float with at most two digits after decimal point

treatment_percentage
float with at most two digits after decimal point

client_business
numeric string or integer

Business associated with the study.

confidence_level
float

Confidence level used in power calculations and final study report.

cooldown_start_time
integer

Start of the pre-measurement cool-down period. This period ends when the study period starts.

description
string

The purpose of the study.

end_time
integer

Time when the study period ends.

مطلوب
name
string

Name of the study.

مطلوب
objectives
list<Object>

A vector of objects describing the objectives assigned to this study.

id
numeric string or integer

is_primary
boolean

name
string

type
enum {SALES, NONSALES, MAE, TELCO, FTL, MAI, PARTNER, BRANDLIFT, BRAND, MPC_CONVERSION, CONVERSIONS}

offsite_datasets
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

adspixels
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

customconversions
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

applications
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

offline_conversion_data_sets
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

product_sets
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

product_catalogs
list<JSON or object-like arrays>

id
numeric string or integer

مطلوب
event_names
list<string>

observation_end_time
integer

The end of the observation period for this study. This period starts when the study period ends.

start_time
integer

The time when the study period starts.

مطلوب
type
enum {LIFT, SPLIT_TEST, CONTINUOUS_LIFT_CONFIG, GEO_LIFT, BACKEND_AB_TESTING}

The type of ad study, such as SPLIT_TEST or LIFT.

viewers
list<int>

This study is shared with these people.

‎Return Type‎

‎This endpoint supports ‎read-after-write‎ and will read the node represented by id in the return type.‎
Struct {
id: numeric string,
}

‎Error Codes‎

خطأالوصف
100Invalid parameter
200Permissions error

جارٍ التحديث

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

جارٍ الحذف

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