This edge has been deprecated and can no longer be used.
/{event-id}/videosUse this endpoint to publish videos to an event. To delete or update an existing video, use the /{video-id} node instead.
To publish a video to an event, send a POST request to the /{event-id}/videos edge on graph-video.facebook.com.
POST /v25.0/{event-id}/videos HTTP/1.1
Host: graph-video.facebook.com
source=%7Bvideo-data%7D/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->post(
'/{event-id}/videos',
array (
'source' => '{video-data}',
),
'{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(
"/{event-id}/videos",
"POST",
{
"source": "{video-data}"
},
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);Bundle params = new Bundle();
params.putString("source", "{video-data}");
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{event-id}/videos",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();NSDictionary *params = @{
@"source": @"{video-data}",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{event-id}/videos"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];multipart/form-data.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.
As of April 24,2018, the pubish_actions permission has been removed. Please see the Breaking Changes Changelog for more details. To provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead.
This endpoint requires a user access token with the publish_actions permission.
| Name | Description | Type |
|---|---|---|
| The target ID where the video is posted to. |
|
| The title of the video. |
|
| The description of the video, used as the accompanying status message in any feed story. This parameter can contain mentions of other Facebook Pages using the following syntax: @[page-id] For example the following description would mention the Facebook Developers page inline: Test message @[19292868552] tag Usage of this feature is subject to review but by using Pages you are an admin of (both to make the API call, and to be used in a mention), and an app you are a developer of, you can test it for yourself before review. |
|
| The video, encoded as form data. This field is required. | |
| Accessible URL of a video file. Cannot be used with |
|
| The video thumbnail raw data to be uploaded and associated with a video. |
|
| Type of chunked upload request. |
|
| The size of the entire video file in bytes. |
|
| Start byte position of the file chunk. |
|
| The video file chunk, encoded as form data. This field is required during |
|
| ID of the chunked upload session. |
|
If successful:
Struct {
id: numeric string,
upload_session_id: numeric string,
video_id: numeric string,
start_offset: numeric string,
end_offset: numeric string,
success: bool,
skip_upload: bool,
}You can't read the videos uploaded to an event using this edge.
You can't update using this edge.
You can't delete using this edge.