22/04/2016
How to integrate Facebook live video Api
Before do anything firstly I have to create a page on the Facebook and this page should public accessible. Once create a page you have to approve this by Facebook. After approve your live video will display here.
How do this.
Step 1.
Create a page
Step 2.
Approved by Facebook
Step 3.
Create an App and configure it with canvas url.
Step 4.
Create a web page and put this code.
Create Live Stream To Facebook
document.getElementById('liveButton').onclick = function() {
FB.ui({
display: 'popup',
method: 'live_broadcast',
phase: 'create',
}, function(response) {
if (!response.id) {
alert('dialog canceled');
return;
}
alert('stream url:' + response.secure_stream_url);
FB.ui({
display: 'popup',
method: 'live_broadcast',
phase: 'publish',
broadcast_data: response,
}, function(response) {
alert("video status: \n" + response.status);
});
});
};
Step 5.
When access this page a dialog box will appear ask the location for video streaming like user time line, page etc.
After Next click it will response server url and some parameters. Just write down and save it for further use.
Step 6.
Suppose we are going to video streaming on the page then go to your page and click on the Publishing Tools. There is a video section in left menu, click on the New Video
And setup the server url and parameters here.
Now you have setup successfully live video api…
For more details document go through this url.
https://developers.facebook.com/docs/videos/live-video-api
https://www.facebook.com/facebookmedia/get-started/live
http://techcrunch.com/2015/08/05/facescope/
Cheers! ….
Live Video API Reference Documentation