This document refers to an outdated version of Graph API. Please use the latest version.
Graph API Version

Video

Represents an individual video on Facebook.

Reading

A Video

Permissions

  • You must use a valid Page Access Token or User Access Token for any video with public privacy settings.
  • For videos uploaded by someone, and any videos in which they have been tagged you need a user access token for that person with user_videos permission.

Source URL

Note that the source URL for reading a posted video changes over time by design. If you save the URL and use it later it will not work.

Examples

Graph API Explorer
GET /v2.2/{video-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{video-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{video-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{video-id}",
    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:@"/{video-id}"
                                      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

id

numeric string

The video ID.

backdated_time

datetime

The time when the video post was created.

backdated_time_granularity

enum

Accuracy of the backdated time.

created_time

datetime

The time the video was initially published.

description

string

The description of the video.

embed_html

string

The HTML element that may be embedded in a Web page to play the video.

format

The different formats of the video.

from

The profile that created the video.

icon

string

The icon that Facebook displays when videos are published to the feed.

is_instagram_eligible

bool

Whether the video is eligible to be promoted on Instagram

length

float

Duration of this video.

name

string

The video title or caption.

DefaultDeprecated

permalink_url

string

URL to the permalink page of the video.

picture

string

The URL for the thumbnail picture of the video.

place

Location associated with the video, if any.

privacy

Privacy setting for the video.

source

string

A URL to the raw, playable video file.

status

Object describing the status attributes of a video.

universal_video_id

string

The publishers asset management code for this video.

updated_time

datetime

The last time the video or its caption was updated.

Edges

EdgeDescription

auto_generated_captions

Auto-generated Captions from automated speech recognition system.

captions

Captions for the video.

comments

Users comments for the video.

Default

likes

People who like this

sharedposts

Posts that share this video.

sponsor_tags

Sponsor pages tagged in the video.

tags

Users tagged in the video.

Default

thumbnails

Thumbnails for the video.

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You can publish videos by using the /{user-id}/videos, /{event-id}/videos and /{page-id}/videos edges.


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

Parameters

NameDescription
composer_session_id
string

composer session id

description
UTF-8 string

description

Supports Emoji
file_url
string

file url

is_explicit_share
boolean

is explicit share

manual_privacy
boolean
Default value: false

manual privacy

name
string

The name of the video in the library.

og_action_type_id
numeric string or integer

og action type id

og_icon_id
numeric string or integer

og icon id

og_object_id
OG object ID or URL string

og object id

og_phrase
string

og phrase

og_suggestion_mechanism
string

og suggestion mechanism

referenced_sticker_id
numeric string or integer

referenced sticker id

source
string

The video, encoded as form data. See the Video Format doc for more details on video formats.

time_since_original_post
int64

time since original post

title
UTF-8 string

The name of the video being uploaded.

Supports Emoji
unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

unpublished content type

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You can make a POST request to videos edge from the following paths:
When posting to this edge, a Video will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • read_page_mailboxes
  • ads_management
  • manage_pages
  • publish_pages
  • publish_actions
Page management Apps
  • manage_pages
  • publish_pages
  • publish_actions
Other Apps
No data

Parameters

NameDescription
backdated_time
datetime

The time when the video post was created.A backdated post needs to be published.

backdated_time_granularity
enum{year, month, day, hour, min, none}

Accuracy of the backdated time.A backdated post needs to be published.

description
UTF-8 string

The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax:

@[page-id]

For example the following description would mention the Facebook Developers page inline:

Test message @[19292868552] tag

Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review.

Supports Emoji
direct_share_status
int64

The status to allow sponsor directly boost the post.

expiration
Object

Time the video expires and whether it will be removed or hidden.

time
string
type
enum{expire_and_delete, expire_only}
feed_targeting
feed target

Object that controls news feed targeting for this content. Anyone in these demographics will be more likely to see this content, those not will be less likely, but may still see it anyway. Any of the targeting fields shown here can be used, none are required.

countries
list<string>

Values for targeted countries. You can specify up to 25 countries. Use ISO 3166 format codes.

regions
list<Object>

Values for targeted regions. Use type of adregion to find Targeting Options and use the returned key to specify. For example:

search/?type=adregion&q=California
key
int64
cities
list<Object>

Values for targeted cities. Use type of adcity to find Targeting Options and use the returned key to specify.

key
int64
zipcodes
list<Object>
key
string
locales
list<string>

Values for targeted locales. Use type of adlocale to find Targeting Options and use the returned key to specify.

age_min
int64

Must be 13 or higher. Default is 0.

age_max
int64

Maximum age.

genders
list<int64>

Target specific genders. 1 targets all male viewers and 2 females. Default is to target both.

college_years
list<int64>

Array of integers. Represent graduation years from college.

education_statuses
list<int64>

Array of integers which represent current educational status. Use 1 for high school, 2 for undergraduate, and 3 for alum (or localized equivalents).

interested_in
list<int64>

Indicates targeting based on the 'interested in' field of the user profile. You can specify an integer of 1 to indicate male, 2 indicates female. Default is all types. Please note 'interested in' targeting is not available in France due to local laws.

relationship_statuses
list<int64>

Array of integers for targeting based on relationship status. Use 1 for single, 2 for 'in a relationship', 3 for married, and 4 for engaged. Default is all types.

interests
list<int64>

One or more IDs of pages to target fans of pages.Use type of page to get possible IDs as find Targeting Options and use the returned id to specify.

relevant_until
int64

Specify time when story becomes irrelevant to show.

file_url
string

Accessible URL of a video file. Cannot be used with upload_phase.

fov
int64

360 video only: Vertical field of view

initial_heading
int64

360 video only: Horizontal camera perspective to display when the video begins.

initial_pitch
int64

360 video only: Vertical camera perspective to display when the video begins.

published
boolean
Default value: true

Whether a post about this video is published. Non-published videos cannot be backdated.

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

scheduled_publish_time
int64

Time when the page post about this video should go live, this should be between 10 mins and 6 months from the time of publishing the video.

source
string

The video, encoded as form data. This field is required.

spherical
boolean
Default value: false

Set if the video was recorded in 360 format.

sponsor_id
numeric string or integer

Facebook Page id that is tagged as sponsor in the video post

sponsor_relationship
int64

Sponsor Relationship, such as Presented By or Paid PartnershipWith

targeting
target

Object that limits the audience for this content. Anyone not in these demographics will not be able to view this content. This will not override any Page-level demographic restrictions that may be in place.

countries
list<string>

Values for targeted countries. You can specify up to 25 countries. Use ISO 3166 format codes.

regions
list<Object>

Values for targeted regions. Use type of adregion to find Targeting Options and use the returned key to specify. For example:

search/?type=adregion&q=California
key
int64
cities
list<Object>

Values for targeted cities. Use type of adcity to find Targeting Options and use the returned key to specify.

key
int64
locales
list<string>

Values for targeted locales. Use type of adlocale to find Targeting Options and use the returned key to specify.

thumb
image

The video thumbnail raw data to be uploaded and associated with a video.

title
UTF-8 string

The title of the video.

Supports Emoji
universal_video_id
string

The publishers asset management code for this video.

unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

Type of unpublished content, such as scheduled, draft or ads_post.

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You can make a POST request to videos edge from the following paths:
When posting to this edge, a Video will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • read_page_mailboxes
  • ads_management
  • manage_pages
  • publish_pages
  • publish_actions
  • user_managed_groups
Page management Apps
  • manage_pages
  • publish_actions
Other Apps
  • publish_actions

Parameters

NameDescription
description
UTF-8 string

The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax:

@[page-id]

For example the following description would mention the Facebook Developers page inline:

Test message @[19292868552] tag

Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review.

Supports Emoji
direct_share_status
int64

The status to allow sponsor directly boost the post.

file_url
string

Accessible URL of a video file. Cannot be used with upload_phase.

fov
int64

360 video only: Vertical field of view

initial_heading
int64

360 video only: Horizontal camera perspective to display when the video begins.

initial_pitch
int64

360 video only: Vertical camera perspective to display when the video begins.

no_story
boolean
Default value: false

If set to true, this will suppress feed and timeline story.

privacy
Privacy Parameter

Determines the privacy settings of the video. If not supplied, this defaults to the privacy level granted to the app in the Login Dialog. This field cannot be used to set a more open privacy setting than the one granted.

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

source
string

The video, encoded as form data. This field is required.

spherical
boolean
Default value: false

Set if the video was recorded in 360 format.

sponsor_id
numeric string or integer

Facebook Page id that is tagged as sponsor in the video post

thumb
image

The video thumbnail raw data to be uploaded and associated with a video.

title
UTF-8 string

The title of the video.

Supports Emoji
unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

Type of unpublished content, such as scheduled, draft or ads_post.

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You can make a POST request to videos edge from the following paths:
When posting to this edge, a Video will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • read_page_mailboxes
  • manage_pages
  • publish_pages
  • publish_actions
Other Apps
No data

Parameters

NameDescription
description
UTF-8 string

The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax:

@[page-id]

For example the following description would mention the Facebook Developers page inline:

Test message @[19292868552] tag

Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review.

Supports Emoji
file_url
string

Accessible URL of a video file. Cannot be used with upload_phase.

fov
int64

360 video only: Vertical field of view

initial_heading
int64

360 video only: Horizontal camera perspective to display when the video begins.

initial_pitch
int64

360 video only: Vertical camera perspective to display when the video begins.

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

source
string

The video, encoded as form data. This field is required.

spherical
boolean
Default value: false

Set if the video was recorded in 360 format.

thumb
image

The video thumbnail raw data to be uploaded and associated with a video.

title
UTF-8 string

The title of the video.

Supports Emoji
unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

Type of unpublished content, such as scheduled, draft or ads_post.

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You can make a POST request to videos edge from the following paths:
When posting to this edge, a Video will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • read_page_mailboxes
  • ads_management
  • manage_pages
  • publish_pages
  • publish_actions
  • user_managed_groups
Page management Apps
  • read_page_mailboxes
  • manage_pages
  • publish_pages
  • publish_actions
  • user_managed_groups
Other Apps
  • publish_actions

Parameters

NameDescription
description
UTF-8 string

The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax:

@[page-id]

For example the following description would mention the Facebook Developers page inline:

Test message @[19292868552] tag

Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review.

Supports Emoji
file_url
string

Accessible URL of a video file. Cannot be used with upload_phase.

fov
int64

360 video only: Vertical field of view

initial_heading
int64

360 video only: Horizontal camera perspective to display when the video begins.

initial_pitch
int64

360 video only: Vertical camera perspective to display when the video begins.

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

source
string

The video, encoded as form data. This field is required.

spherical
boolean
Default value: false

Set if the video was recorded in 360 format.

thumb
image

The video thumbnail raw data to be uploaded and associated with a video.

title
UTF-8 string

The title of the video.

Supports Emoji
unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

Type of unpublished content, such as scheduled, draft or ads_post.

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You can make a POST request to videos edge from the following paths:
When posting to this edge, a Video will be created.

Parameters

NameDescription
description
UTF-8 string

The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax:

@[page-id]

For example the following description would mention the Facebook Developers page inline:

Test message @[19292868552] tag

Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review.

Supports Emoji
file_url
string

Accessible URL of a video file. Cannot be used with upload_phase.

fov
int64

360 video only: Vertical field of view

initial_heading
int64

360 video only: Horizontal camera perspective to display when the video begins.

initial_pitch
int64

360 video only: Vertical camera perspective to display when the video begins.

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

source
string

The video, encoded as form data. This field is required.

spherical
boolean
Default value: false

Set if the video was recorded in 360 format.

thumb
image

The video thumbnail raw data to be uploaded and associated with a video.

title
UTF-8 string

The title of the video.

Supports Emoji
unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST}

Type of unpublished content, such as scheduled, draft or ads_post.

Return Type

Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}
You may perform a POST request to the following edge from this node:

Validation Rules

ErrorDescription
100Invalid parameter
210User not visible
475Due to activity related to copyright infringement on your Facebook account, we have disabled your ability to upload any further videos.
200Permissions error

Updating

Permissions

Your app needs an app access token with publish_actions permission to update a video.


You can update a Video by making a POST request to /{graph_video_node_id}.

Parameters

NameDescription
backdated_time
datetime

The time when the video post was created. A backdated post needs to be published.

backdated_time_granularity
enum{year, month, day, hour, min, none}
Default value: none

Accuracy of the backdated time. A backdated post needs to be published.

description
UTF-8 string

Description of the video.

Supports Emoji
direct_share_status
int64

The status to allow sponsor directly boost the post.

expiration
Object

Time the video expires and whether it will be removed or hidden.

time
string
type
enum{expire_and_delete, expire_only}
name
UTF-8 string

Video title or caption.

Supports Emoji
place
place tag

Location associated with the video, if any.

preferred_thumbnail_id
numeric string

Preferred thumbnail image ID

scheduled_publish_time
int64

Scheduled publish time for the video.

sponsor_id
numeric string or integer

Facebook Page id that is tagged as sponsor in the video post

sponsor_relationship
int64

Sponsor Relationship, such as Presented By or Paid PartnershipWith

tags
list<numeric string>

Users tagged in the video.

universal_video_id
string

The publishers asset management code for this video.

Return Type

Struct {
success: bool,
}
You may perform a POST request to the following edge from this node:

Validation Rules

ErrorDescription
100Invalid parameter
210User not visible
475Due to activity related to copyright infringement on your Facebook account, we have disabled your ability to upload any further videos.
200Permissions error

Deleting

Permissions

To delete a user video, a user access token with publish_actions is required.

To delete a page video, a page access token with publish_actions is required.

Your app needs an user access token with publish_actions permission to delete a video.

Example

https://graph.facebook.com/<video_id>
You can dissociate a Video from a GraphPageNode by making a DELETE request to /{graph_page_node_id}/featured_videos_collection.

Parameters

NameDescription
video_id
numeric string or integer

ID of the video to be unfeatured from the Page.

Required

Return Type

Struct {
success: bool,
}
You may perform a DELETE request to the following edge from this node:

Validation Rules

ErrorDescription
200Permissions error