เวอร์ชันของ API กราฟ

User Ad Studies

การอ่าน

UserAdStudies

ตัวอย่าง

Graph API Explorer
GET /v19.0/{user-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(
    '/{user-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(
    "/{user-id}/ad_studies",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-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:@"/{user-id}/ad_studies"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
หากคุณต้องการเรียนรู้วิธีใช้ API กราฟ โปรดอ่านคู่มือการใช้ API กราฟของเรา

พารามิเตอร์

จุดสิ้นสุดนี้ไม่ต้องพารามิเตอร์ใดๆ

ช่อง

การอ่านจากจุดเชื่อมโยงนี้จะให้ผลลัพธ์ที่อยู่ในรูปแบบ JSON:

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

data

รายชื่อของโหนด AdStudy

paging

หากต้องการทราบข้อมูลเพิ่มเติมเกี่ยวกับการแบ่งหน้า โปรดดูคำแนะนำ API กราฟ

summary

ข้อมูลโดยรวมเกี่ยวกับจุดเชื่อมโยง เช่น จำนวนนับ ระบุช่องกรอกข้อมูลเพื่อดึงข้อมูลในพารามิเตอร์สรุป (เช่น summary=total_count)

ช่องคำอธิบาย
total_count
unsigned int32

Total number of lift studies for this person

Error Codes

ข้อผิดพลาดคำอธิบาย
270This Ads API request is not allowed for apps with development access level (Development access is by default for all apps, please request for upgrade). Make sure that the access token belongs to a user that is both admin of the app and admin of the ad account

การสร้าง

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>

A shape to describe the cells of 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 study

confidence_level
float

Confidence level used in power calculation and final report

cooldown_start_time
integer

The beginning of the pre measurement cooldown period. This period ends when the study period starts.

description
string

A brief description about the purpose of the study.

end_time
integer

The time when the study period ends.

name
string

The 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}

The type of ad study, either SPLIT_TEST or LIFT.

viewers
list<int>

The list of people who this study has been shared with.

ประเภทการส่งกลับ

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

Error Codes

ข้อผิดพลาดคำอธิบาย
100Invalid parameter
200Permissions error

กำลังอัพเดต

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้

กำลังลบ

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้