Graph API Version

User Live Videos

Reading

Live videos from this person

Graph API Explorer
GET /v2.10/{user-id}/live_videos HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{user-id}/live_videos'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{user-id}/live_videos",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/live_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}/live_videos"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
  • manage_pages
  • pages_show_list
  • user_videos
  • user_posts
Page management Apps
No data
Other Apps
Permissions are not usually requested.

Parameters

NameDescription
broadcast_status
list<enum {UNPUBLISHED, LIVE, LIVE_STOPPED, PROCESSING, VOD, SCHEDULED_UNPUBLISHED, SCHEDULED_LIVE, SCHEDULED_EXPIRED, SCHEDULED_CANCELED}>

Allows you to specify what kind of live videos return.No value returns all status types

type
enum{tagged, uploaded}
Default value: uploaded

Allows you to query which type of live videos to return

Fields

Reading from this edge will return a JSON formatted result:

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

data

A list of LiveVideo nodes.

paging

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

Validation Rules

ErrorDescription
100Invalid parameter

Creating

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

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
  • publish_actions
  • user_managed_groups
  • user_events
  • user_videos
  • user_friends
Page management Apps
  • pages_show_list
  • publish_actions
Other Apps
  • publish_actions

Parameters

NameDescription
content_tags
list<numeric string>

Tags that describe the contents of the video. Use search endpoint with type=adinterest to get possible IDs.

Example:

/search?type=adinterest&q=couscous
description
UTF-8 string

The description of the live video.

Supports Emoji
enable_backup_ingest
boolean

Set this to true to enable a backup ingest url. stop_on_delete_stream defaults to false when set

encoding_settings
string

Identifier of the encoding settings group the broadcaster is using for this stream.

fisheye_video_cropped
boolean

Whether the single fisheye video is cropped or not

front_z_rotation
float

The front z rotation in degrees on the single fisheye video

is_spherical
boolean

Flag that denotes the broadcast is a 360 live broadcast.

original_fov
int64

Original field of view of the camera

planned_start_time
integer

Unix timestamp when the broadcaster plans to go live.

privacy
Privacy Parameter

Privacy for this live video.

published
boolean

Set this to false to preview the stream before going live.

Deprecated. Prefer setting the status instead.

save_vod
boolean

Whether or not the video data should be saved for later consumption in VOD format. Default is true, except for certain broadcasts types (e.g. AMBIENT)

schedule_custom_profile_image
image

Custom image that will appear in the scheduled live story and lobby.

spatial_audio_format
enum {ambiX_4}

Denotes the format of the spatial audio stream. When unspecified audio is presumed to be mono or stereo.

status
enum {UNPUBLISHED, LIVE_NOW, SCHEDULED_UNPUBLISHED, SCHEDULED_LIVE, SCHEDULED_CANCELED}

Choose between UNPUBLISHED or LIVE_NOW.

stop_on_delete_stream
boolean

Set this to true if stream should be stopped when deleteStream RTMP command received.

stream_type
enum {REGULAR, AMBIENT}

The type of stream. Default value: REGULAR. Use AMBIENT for continuous broadcasts that last days or weeks (like panda cams). Ambient broadcasts do not generate VOD or notifications.

title
UTF-8 string

The title of the live video.

Supports Emoji

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
stream_url: string,
secure_stream_url: string,
stream_secondary_urls: List [
string
],
secure_stream_secondary_urls: List [
string
],
}

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.