Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Objects
    • Achievement(Instance)
    • Album
    • App and Game Groups
    • Application
    • Checkin
    • Comment
    • Domain
    • Errors
    • Event
    • Field Expansion
    • FriendList
    • Group
    • Insights
    • Link
    • Message
    • Note
    • Offer
    • Order
    • Page
    • Pagination
    • Payment
    • Photo
    • Pictures
    • Post
    • Privacy Parameter
    • Publishing
    • Question
    • QuestionOption
    • Realtime Updates
    • Review
    • Search
    • Selecting Results
    • Status message
    • Thread
    • User
    • Video

Video

Facebook APIs › Graph API › Video

An individual Video in the Graph API.

To read a Video, issue an HTTP GET request to /VIDEO_ID with the user_videos permission. This will return videos that the user has uploaded or has been tagged in.

Video POST requests should use graph-video.facebook.com.

The User, Application, Event, Group, and Page objects have a videos connection. We support the following formats for uploading videos to these connections:

  • 3g2 (Mobile Video)
  • 3gp (Mobile Video)
  • 3gpp (Mobile Video)
  • asf (Windows Media Video)
  • avi (AVI Video)
  • dat (MPEG Video)
  • divx (DIVX Video)
  • dv (DV Video)
  • f4v (Flash Video)
  • flv (Flash Video)
  • m2ts (M2TS Video)
  • m4v (MPEG-4 Video)
  • mkv (Matroska Format)
  • mod (MOD Video)
  • mov (QuickTime Movie)
  • mp4 (MPEG-4 Video)
  • mpe (MPEG Video)
  • mpeg (MPEG Video)
  • mpeg4 (MPEG-4 Video)
  • mpg (MPEG Video)
  • mts (AVCHD Video)
  • nsv (Nullsoft Video)
  • ogm (Ogg Media Format)
  • ogv (Ogg Video Format)
  • qt (QuickTime Movie)
  • tod (TOD Video)
  • ts (MPEG Transport Stream)
  • vob (DVD Video)
  • wmv (Windows Media Video)

The aspect ratio of the video must be between 9x16 and 16x9, and the video cannot exceed 1024MB or 180 minutes in length.

Example

A video on the Facebook Page:

https://graph.facebook.com/3802752155040

Fields

The Video object has the following fields.

NameDescriptionPermissionsReturns
id

The video ID

user_videos

string

from

The profile (user or page) that created the video

user_videos

object containing id and name fields

tags

The users who are tagged in this video

user_videos

array of objects containing id and name fields

name

The video title or caption

user_videos

string

description

The description of the video

user_videos

string

picture

The URL for the thumbnail picture for the video

user_videos

string

embed_html

The html element that may be embedded in an Web page to play the video

user_videos

string containing a valid URL

icon

The icon that Facebook displays when video are published to the Feed

user_videos

string containing a valid URL

source

A URL to the raw, playable video file

user_videos

string containing a valid URL

created_time

The time the video was initially published

user_videos

string containing ISO-8601 date-time

updated_time

The last time the video or its caption were updated

user_videos

string containing ISO-8601 date-time

comments

All of the comments on this video

user_videos

array of objects containing id, from, message, created_time, and likes fields

Connections

The Video object has the following connections.

NameDescriptionPermissionsReturns
likes

All of the likes on this video

user_videos

array of objects containing id and name fields.

comments

All of the comments on this video

user_videos

array of objects containing id, from, message, created_time, and likes fields.

picture

The image which represents the content of the video

user_videos

An HTTP 302 to the URL of the album's cover picture.


likes

Create

You can like a Video by issuing an HTTP POST request to VIDEO_ID/likes with the publish_stream permission. No parameters necessary.

If the create is successful, you get the following return.

Description Type
If the create succeeded. boolean

Delete

You can unlike a Video by issuing an HTTP DELETE request to VIDEO_ID/like with the publish_stream permission.

If the delete is successful, you get the following return.

Description Type
If the unlike succeeded boolean

comments

Create

You can comment on a Video by issuing an HTTP POST request to VIDEO_ID/comments with the publish_stream permission and following parameters.

Parameter Description Type Required
message Comment text string yes

If the create is successful, you get the following return.

Name Description Type
id The new comment ID string

How-Tos

How to upload a video to a user's profile using Graph API

How to upload a video to an Application, Group, or Page's wall using Graph API

Updated about 5 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy