Graph 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
}];
如果想了解如何使用 Graph API,請參閱我們的使用 Graph 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:
發佈到此關係連線時,會建立 a VideoThumbnail

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 寫入後讀取 and will read the node to which you POSTed.
Struct {
success: bool,
}

Error Codes

錯誤說明
100Invalid parameter
200Permissions error
104Incorrect signature

更新中

你無法在此端點執行此操作。

正在刪除

你無法在此端點執行此操作。