그래프 API 버전

User Live Videos

Represents a collection of LiveVideos on a User.

읽기

Get a collection of LiveVideos on a User.

새로운 페이지 환경

This endpoint is supported for 새로운 페이지 환경.

Graph API Explorer
GET /v19.0/{user-id}/live_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}/live_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}/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();
/* 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
}];
그래프 API를 사용하는 방법을 알아보려면 그래프 API 사용 가이드를 읽어보세요.

매개변수

매개변수설명
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

source
enum{target, owner}
기본 값: target

Specifies what the source of the videos should be. 'target' gets videos broadcasted onto the user's timeline, 'owner' gets videos made by the user

필드

이 에지로부터 읽는 경우 JSON 형식의 결과를 반환합니다:

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

data

LiveVideo 노드 리스트.

paging

페이지 매김에 대한 자세한 정보는 그래프 API 가이드를 확인하세요.

오류 코드

오류설명
200Permissions error
190Invalid OAuth 2.0 Access Token
368The action attempted has been deemed abusive or is otherwise disallowed
100Invalid parameter

만들기

다음 경로에서 live_videos 에지에 POST 요청을 만들 수 있습니다:
이 에지에 게시할 때 a LiveVideo이(가) 생성됩니다.

라이브 방송 예약은 v12.0부터 사용이 중단되고 2021년 12월 14일부터 모든 버전에서 사용이 중단됩니다. planned_start_time 매개변수를 포함하여 POST /ID/live-video 엔드포인트를 호출하면 오류가 반환됩니다.

매개변수

매개변수설명
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.

이모티콘 지원
donate_button_charity_id
numeric string or integer

Specifies the ID of the charity for which a donate button will be added to the live video.

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. This parameter is currently only in use for live-360 broadcasts. The value to be passed to this parameter is the value of the identifier key of the encoding settings preset. Encoding presets can be found by querying the /broadcaster_encoding_settings Graph API endpoint (GET query).

event_params
Live Video Event Parameter

Parameters specific to Live Online Event broadcast. If start_time (unix timecode) is set, LOE's start time will be updated. Also, cover (url) uploads an image to use as the cover photo for the event.

Example: { start_time: 1641013200, cover: 'https://your.url/image.jpg', }

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

privacy
Privacy Parameter

Privacy for this live video.

projection
enum {EQUIRECTANGULAR, CUBEMAP, HALF_EQUIRECTANGULAR}

Flag that denotes expected projection for 360 live streams. The default value is EQUIRECTANGULAR.

published
boolean

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

                    Deprecated. Prefer setting the status instead.

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}

The status of the broadcast. A LIVE_NOW broadcast is currently live and visible to users. An UNPUBLISHED broadcast is in preparation; it's not visible to other users, and it may be automatically deleted after several hours in this state. (Consider using the SCHEDULED states to create a planned, future broadcast.)

stereoscopic_mode
enum {MONO, LEFT_RIGHT, TOP_BOTTOM}

Set this parameter to the stereoscopic mode for this video.

stop_on_delete_stream
boolean

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

title
UTF-8 string

The title of the live video. Maximum 254 characters.

이모티콘 지원

반환 유형

이 엔드포인트는 기록 후 읽기를 지원하며 반환 유형에서 id로 표시되는 노드를 읽습니다.
Struct {
id: numeric string,
stream_url: string,
secure_stream_url: string,
stream_secondary_urls: List [
string
],
secure_stream_secondary_urls: List [
string
],
dash_ingest_url: string,
dash_ingest_secondary_urls: List [
string
],
event_id: numeric string,
}

오류 코드

오류설명
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed
100Invalid parameter
190Invalid OAuth 2.0 Access Token
102Session key invalid or no longer valid
1005Fail to upload cover photo.
1000Invalid time for an event.

업데이트 중

이 엔드포인트에서 수행할 수 없는 작업입니다.

삭제 중

이 엔드포인트에서 수행할 수 없는 작업입니다.