The Workplace Go Live Dialog can only be used by live-streaming apps under a specific partner agreement.
If you're interested in integrating with the Workplace Go Live Dialog, raise a direct support ticket within your Workplace community support centre.
The Workplace Go Live dialog enables a user of your app to broadcast a live video stream into Workplace from your app, via a simple web redirect flow, and without having to manually pass any stream keys or RTMPS URLs between your app and Workplace.
As a developer of an app that provides live-streaming functionality, the integration steps are as follows:
In order to integrate with the Go Live Dialog and stream to Workplace, you'll need to create a Workplace app, by following the instructions in this guide: Request a Workplace Third Party App.
The app you created must then be configured by a Meta employee to enable the capability to use the Go Live Dialog. This can be done by your partner contact in the Workplace team. Business verification and a platform contract will be required before the capability can be enabled for your app.
You will also be required to provide the URL to your endpoint to which the dialog will redirect with stream params. This can be a single URL or a regular expression for matching different URLs on a common domain.
Because the Go Live Dialog doesn't share any customer data with your app, app review and security review are not required for this type of integration.
Create a button or link within your app which initiates the Go Live dialog, either via webview or browser window.
The URL pattern for this dialog is as follows:
https://work.workplace.com/dialog/live_broadcast?app_id={id}&redirect_uri={your-redirect}&phase=create&hc_location=ufiWhen the dialog loads, Workplace will authenticate the user, ask them to choose a destination for the live stream, and then redirect them back to your app, passing stream_url and stream_key as query-string parameters.
<?php
$id = $_GET['id'];
$stream_url = $_GET['stream_url'];
$secure_stream_url = $_GET['secure_stream_url'];
// calculate the subdomain, e.g., acme in acme.workplace.com
$referer = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
$subdomain = array_shift((explode('.', $referer)));
if (isset($_GET['error_code'])) {
echo($_GET['error_message']);
exit();
}
// read the stream key and stream url, use this within your app to initiate the broadcast
$params = json_encode(
array(
'id' => $id,
'stream_url' => $stream_url,
'secure_stream_url' => $secure_stream_url,
)
);
$params_encoded = urlencode($params);Finally, redirect the user back to Workplace to allow them to view the broadcast preview and confirm the start of the Live on Workplace.
// redirect the user back to Workplace so they can preview the video & go live
$url = 'https://'.$subdomain.'workplace.com/dialog/live_broadcast?app_id={id}&redirect_uri=https://www.exampleapp.net/live_broadcast&display=popup&phase=publish¶ms='.$params_encoded&hc_location=ufi;
header('Location: '.$url);
exit();
?>