Blog

  • Live Streaming with facebook

    Posted by Vipin Pokhriyal | Last Updated: 04-Dec-17

    1). Go to https://developers.facebook.com Then we need to create an application for facebook access for this go to  My apps  then add new app into facebook developer page. After creating an app go Tools & support then Graph API Explorer. On right side top of the corner select your application which one created for facebook access. If u select any page etc it will give u access_token.Token will be expire if it previously created if it expire it will give u refresh option which will be valid for particular time also u can extend the time of access_token for your application testing purpose. Using access_token we hit the GET request with following path me?field=id  it will give us id for that particular page.

    You can see it will return response like this.

    {
     "id": "18XXXXXXXXXXXX89",
     "name": "Vipin Pokhriyal"
    }
    

     2). After getting the id create a POST request with following path {page_id}/live_videos, it will generate response like this-

     

     

     

    Also we can use -

    /{user_id}/live_videos
    /{group_id}/live_videos
    /{event_id}/live_videos
     
    • We have to use  stream_url for getting facebook url and stream key which we have to use in OBS Broadcasting.

    i).rtmp://rtmp-api.facebook.com:80/rtmp it is url for facebook.

    ii).19XXXXXXXx43?ds=1&s_e=4&s_l=1&a=ATjJUwP8XJvrz48Z is stream key for user.

    3).After that open OBS go to setting select the stream type then you can choose custom streaming server or streaming services, the only one difference is there streaming services use prefix url, we have to give only stream key in this case and when we choose custom we have  to give both stream url and stream key, then press ok.

    4).Now click the start streaming.

    5).If it you got error like this at the time connecting stream.

     

     

     

    remove port 80 from facebook stream url it will work fine.It will look like this i created it on my Test page which id given in post request(point No. 2).
    Now you can see your streaming is working into your facebook profile.

     

Tags: LiveStreaming