Graph API Version

Video Caption

Reading

Video Caption

Examples

Graph API Explorer
GET v2.10/...?fields={fieldname_of_type_VideoCaption} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '...?fields={fieldname_of_type_VideoCaption}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "...?fields={fieldname_of_type_VideoCaption}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_VideoCaption}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"...?fields={fieldname_of_type_VideoCaption}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

create_time

int32

The time when caption is added

is_auto_generated

bool

Whether this is from automated transcription

is_default

bool

Whether this is the default caption locale

locale

string

The locale of the caption

locale_name

string

The locale name of the caption

uri

string

The URI of the caption file

Edges

No edges

Creating

You can't perform this operation on this endpoint.

Updating

You can update a VideoCaption by making a POST request to /{video_id}/captions.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • pages_show_list
  • publish_actions
  • user_videos
Other Apps
  • publish_actions
  • user_videos

Parameters

NameDescription
captions_file
file

Caption file in SRT (SubRip Text) format. File name must be in the format filename.locale.srt

default_locale
string

Specify which locale should be used as the default for the video. Can be set to 'none'

locales_to_delete
list<string>
Default value: Vector

locales of caption to delete

Return Type

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

Deleting

You can dissociate a VideoCaption from a Video by making a DELETE request to /{video_id}/captions.

Parameters

NameDescription
locale
string

Specify which locale should be deleted

Required

Return Type

Struct {
success: bool,
}