Graph API Version

User Videos

Reading

GET GraphUserVideosEdge

Example

Graph API Explorer
GET /v3.3/{user-id}/videos 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(
    '/{user-id}/videos',
    '{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(
    "/{user-id}/videos",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/videos",
    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:@"/{user-id}/videos"
                                      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

ParameterDescription
type
enum{tagged, uploaded}
Default value: tagged

Allows you to query which type of videos to return

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of Video nodes.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Creating

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

Parameters

ParameterDescription
audio_story_wave_animation_handle
string

Everstore handle of wave animation used to burn audio story video

content_category
enum {BEAUTY_FASHION, BUSINESS, CARS_TRUCKS, COMEDY, CUTE_ANIMALS, ENTERTAINMENT, FAMILY, FOOD_HEALTH, HOME, LIFESTYLE, MUSIC, NEWS, POLITICS, SCIENCE, SPORTS, TECHNOLOGY, VIDEO_GAMING, OTHER}

Content category of this video.

description
UTF-8 string

                                                              The text describing a post that may be shown in a story about it.
                                                              It may include rich text information, such as entities and emojis.

Supports Emoji
direct_share_status
int64

The status to allow sponsor directly boost the post.

embeddable
boolean

Whether the video is embeddable.

end_offset
int64

end_offset

file_size
int64

The size of the entire video file in bytes.

file_url
string

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

fisheye_video_cropped
boolean

Whether the single fisheye video is cropped or not

fov
int64

360 video only: Vertical field of view

front_z_rotation
float

The front z rotation in degrees on the single fisheye video

guide
list<list<int64>>

360 video only: Guide keyframes data. An array of keyframes, each of which is an array of 3 or 4 elements in the following order: [video timestamp (seconds), pitch (degrees, -90 ~ 90), yaw (degrees, -180 ~ 180), field of view (degrees, 40 ~ 90, optional)], ordered by video timestamp in strictly ascending order.

guide_enabled
boolean

360 video only: Whether Guide is active.

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.

is_voice_clip
boolean

is_voice_clip, used to indicate that if a video is used as audio record

no_story
boolean
Default value: false

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

original_fov
int64

Original field of view of the source camera

original_projection_type
enum {equirectangular, cubemap, equiangular_cubemap, half_equirectangular}

360 video only: The original projection type of the 360 video being uploaded.

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.

react_mode_metadata
JSON-encoded string

This metadata is required for clip reacts feature

referenced_sticker_id
numeric string or integer

Sticker id of the sticker in the post

replace_video_id
numeric string or integer

The video id your uploaded video about to replace

slideshow_spec
JSON object

Specification of a list of images that are used to generate video.

images_urls
list<URL>

A 3-7 element array of the URLs of the images. Required.

Required
duration_ms
integer

The duration in milliseconds of each image. Default value is 1000.

transition_ms
integer

The duration in milliseconds of the crossfade transition between images. Default value is 1000.

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

start_offset
int64

Start byte position of the file chunk.

swap_mode
enum {replace}

Type of replacing video request

title
UTF-8 string

The title of the video

Supports Emoji
transcode_setting_properties
string

Properties used in computing transcode settings for the video

unpublished_content_type
enum {SCHEDULED, DRAFT, ADS_POST, INLINE_CREATED, PUBLISHED}

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

upload_phase
enum {start, transfer, finish, cancel}

Type of chunked upload request.

upload_session_id
numeric string or integer

ID of the chunked upload session.

video_file_chunk
string

The video file chunk, encoded as form data. This field is required during transfer upload phase.

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,
upload_domain: string,
region_hint: string,
transcode_bit_rate_bps: numeric string,
transcode_dimension: numeric string,
}

Validation Rules

ErrorDescription
6001There was a problem uploading your video. Please try again.
6000There was a problem uploading your video file. Please try again with another file.
100Invalid parameter
356There was a problem uploading your video file. Please try again.
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed
332The image you tried to upload is too small. Please try again with a larger image.
390There was a problem uploading your video file. Please try again.
381There was a problem uploading your video file. Please try again.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.