Page Live Videos
For Pages you own or for which you can perform the MODERATE
task, you will need:
pages_read_engagement
and pages_show_list
permissionsFor Pages you do not own or for which you cannot perform the MODERATE
task, you will need:
名前 | 説明 |
---|---|
ページの公開コンテンツへのアクセス | This feature permission may be required. |
GET /v19.0/{page-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(
'/{page-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(
"/{page-id}/live_videos",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{page-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:@"/{page-id}/live_videos"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
パラメーター | 説明 |
---|---|
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 |
enum{target, owner} | デフォルト値: target Specifies what the source of the videos should be. 'target' gets videos broadcasted onto the page's timeline, 'owner' gets videos made by the page. (Note: When the source is set to 'target', unpublished videos will not be returned as they do not have an assigned target at that point.) |
このエッジからの読み込むではJSONフォーマットの結果が返されます:
{ "
data
": [], "paging
": {} }
data
paging
エラー | 詳細 |
---|---|
100 | Invalid parameter |
190 | Invalid OAuth 2.0 Access Token |
200 | Permissions error |
210 | User not visible |
live_videos
のエッジにPOSTリクエストを以下のパスで送信できます: ライブ動画の配信予約はv12.0で廃止され、2021年12月14日にはすべてのバージョンで廃止されます。POST /ID/live-video
エンドポイントをplanned_start_time
パラメーターを指定して呼び出すとエラーが返されるようになります。
パラメーター | 説明 |
---|---|
content_tags list<numeric string> | Tags that describe the contents of the video. Use search endpoint with
|
crossposting_actions array<JSON object> | List of desired changes to crossposting for this broadcast. Each change must provide a [ {page_id: 1234, action: 'enable_crossposting'}, {page_id: 4567, action: 'enable_crossposting_and_create_post'} ] Available action types:
When used with a Live Online Event, this will apply to the event. |
custom_labels list<string> | Labels used to describe the video. Unlike content tags, custom labels are not published and only appear in insights data. |
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 |
event_params Live Video Event Parameter | Parameters specific to Live Online Event broadcast. If 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 |
game_show JSON object | Configure this live stream to be a game show |
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. |
product_items list<numeric string> | Products which will be shown with live videos. |
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.
|
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 |
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. |
targeting target | Object that limits the audience for this content. Anyone not in these demographics will not be able to view this content. When used with a Live Online Event, this will apply to the event. |
title UTF-8 string | The title of the live video. Maximum 254 characters. 絵文字をサポートします |
id
によって表されたノードを戻り値の型で読み込みます。id
: numeric string, stream_url
: string, secure_stream_url
: string, stream_secondary_urls
: List [secure_stream_secondary_urls
: List [dash_ingest_url
: string, dash_ingest_secondary_urls
: List [event_id
: numeric string, エラー | 詳細 |
---|---|
200 | Permissions error |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
100 | Invalid parameter |
190 | Invalid OAuth 2.0 Access Token |
1000 | Invalid time for an event. |
1005 | Fail to upload cover photo. |
102 | Session key invalid or no longer valid |