Phiên bản API Đồ thị

Canvas Template Video

Đọc

A template video inside canvas (Instance Experience)

Ví dụ

Graph API Explorer
GET /v19.0/{canvas-template-video-id} 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(
    '/{canvas-template-video-id}',
    '{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(
    "/{canvas-template-video-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{canvas-template-video-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{canvas-template-video-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Nếu bạn muốn tìm hiểu cách sử dụng API Đồ thị, hãy đọc Hướng dẫn sử dụng API Đồ thị của chúng tôi.

Thông số

Điểm cuối này không có bất kỳ thông số nào.

Trường

Trường thông tinMô tả
id
numeric string

The id of the element

bottom_padding
numeric string

The padding below the element

config_id
numeric string

The config id for this template video

element_group_key
string

The element group key to bundle multiple elements in editing

element_type
enum

The type of the element

name
string

The name of the element

preview_ready
bool

Whether a video for preview is ready

product_set_id
numeric string

The product set id for this template video

template_video_spec

The presentation style of the template video

top_padding
numeric string

The padding above the element

Mã lỗi

LỗiMô tả
104Incorrect signature

Tạo

Bạn không thể thực hiện thao tác này trên điểm cuối này.

Cập nhật

Bạn có thể cập nhật a CanvasTemplateVideo bằng cách thực hiện yêu cầu POST đến /{canvas_template_video_id}.

Thông số

Thông sốMô tả
bottom_padding
float

The padding below the template video

name
string

Name of the template video element

product_set_id
numeric string

Product set ID to generate the template video

template_video_spec
Object

The spec to configure a template video. Including video template and customization

customization
JSON object {string : string}

top_padding
float

The padding above the template video

Kiểu trả về

Điểm cuối này hỗ trợ đọc sau khi ghi và sẽ đọc nút mà bạn đã đăng vào đó.
Struct {
success: bool,
}

Mã lỗi

LỗiMô tả
100Invalid parameter

Xóa

Bạn không thể thực hiện thao tác này trên điểm cuối này.