This document refers to a feature that was removed after Graph API v3.2.
Graph API Version

/{user-id}/videos

There are two similar edges described here:

  • /{user-id}/videos shows all videos this person is tagged in.
  • /{user-id}/videos/uploaded shows all videos that were published to Facebook by this person.

Both of these edges share the exact same API structure, permissions and fields, but we will only describe /videos below.

Reading

Graph API Explorer
GET /v12.0/me/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(
    '/me/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(
    "/me/videos",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/videos",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/me/videos"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • A user access token with user_videos permission is required to see all videos that person is tagged in or has uploaded.

Fields

An array of Video objects.

Publishing

Videos must be encoded as multipart/form-data and published to graph-video.facebook.com instead of the regular Graph API URL.

POST /me/videos
Host: graph-video.facebook.com

source={video-data}

We support the following formats for uploaded videos:

3g2, 3gp, 3gpp, asf, avi, dat, divx, dv, f4v, flv, m2ts, m4v, mkv, mod, mov, mp4, mpe, mpeg, mpeg4, mpg, mts, nsv, ogm, ogv, qt, tod, ts, vob, wmv.

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

Permissions

  • A user access token with publish_actions permission can be used to publish new videos.

Fields

NameDescriptionType

source

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

multipart/form-data

description

The description of the video, used as the accompanying status message in any feed story.

string

title

The title of the video.

string

thumb

Binary image file of thumbnail to be used when the video is stopped (requires ads_management permission)

string

privacy

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.

object

value

The value of the privacy setting.

enum{'EVERYONE', 'ALL_FRIENDS', 'FRIENDS_OF_FRIENDS', 'CUSTOM', 'SELF'}

allow

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that can see the video. This can also be ALL_FRIENDS or FRIENDS_OF_FRIENDS to include all members of those sets.

string|csv[string]

deny

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that cannot see the video.

string|csv[string]

Response

If successful:

NameDescriptionType

id

The newly created video ID

string

Deleting

You can't delete using this edge.

Updating

You can't update using this edge.