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

Video Thumbnail

Represents a thumbnail image on a Video.

การอ่าน

Get fields on a VideoThumbnail.

ตัวอย่าง

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

พารามิเตอร์

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

ช่อง

ช่องคำอธิบาย
id
numeric string

The ID of the thumbnail

height
unsigned int32

The height of the thumbnail

is_preferred
bool

Whether this is the preferred thumbnail for the video

name
string

The name of the thumbnail

scale
float

The scale of the thumbnail

uri
string

The URI of the thumbnail

width
unsigned int32

The width of the thumbnail

การสร้าง

You can make a POST request to thumbnails edge from the following paths:
When posting to this edge, a VideoThumbnail will be created.

Refer to the /{video_id}/thumbnails edge reference for complete usage details.

พารามิเตอร์

พารามิเตอร์คำอธิบาย
is_preferred
boolean
ค่าเริ่มต้น: false

Set to true if this thumbnail is the preferred thumbnail to be shown for this video

source
image

The source for the thumbnail, an image file

ต้องระบุ

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

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Error Codes

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

กำลังอัพเดต

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

กำลังลบ

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