Wowza Community

How can I create a Facebook Live stream target through Wowza Streaming Cloud API?

There are a lot of examples to do this using Wowza Streming Engine REST API (Ex: https://www.wowza.com/docs/send-a-stream-to-facebook-with-wowza-streaming-engine-rest-api). But I cannot find those resource endpoints in Wowza Streaming Cloud REST API. Please point me to the correct API resources in Wowza Streaming Cloud REST API to create a Facebook Live stream target.

Hi @Yehan Pemarathne, we don’t have a FF live specific doc on how to do this with the Cloud REST API, but it is possible. How you would do it is create a custom RTMP target with the API and utilize a stream key from FB.

https://www.wowza.com/docs/how-to-create-an-abr-stream-and-send-it-to-a-target-by-using-the-wowza-streaming-cloud-rest-api#use-a-custom-stream-target

The only other way as you may already know is through the Cloud manager.

https://www.wowza.com/docs/how-to-stream-to-facebook-live-from-wowza-streaming-cloud

Hi @Rose Power-Wowza Community Manager, the resource you linked asks for a “password” which I do not have. But I have a Facebook access token. Can I use that to create a Facebook Live target?

Got it worked.

I entered a custom string as stream_name before. Then after a little research I figured out that stream_name is actually a part of the RTMP URL Facebook provides.

Links: https://flashphoner.com/broadcast-video-stream-from-web-page-to-facebook-and-youtube-simultaneously/

For anyone in my situation:

  • Make sure you set stream_type=AMBIENT when creating the Facebook live video. Otherwise the Facebook will end the video even if the network breaks the data stream.
  • You can set stop_on_delete_stream=false to keep the Facebook live video running even if the Wowza stream is stopped. You have to manually update Facebook live video by setting end_live_stream=true if you do so.

@Yehan Pemarathne were you able to stream to facebook group using the same method I’m able to stream but my peers in the group are not able to view the video dont know why.

@Yehan Pemarathne were you able to stream to facebook group using the same method I’m able to stream but my peers in the group are not able to view the video dont know why.

@mahitej Gangaraju, I’m not sure why it happens like that. But I suspect the following would do the trick.

When creating the Facebook live object, we passed “privacy” field

const data = {
      access_token: accessToken,
      stream_type: 'AMBIENT',
      status: 'LIVE_NOW',
      privacy: { 'value': this.state.selectedFacebookPrivacy }
    };

The privacy.value can be one of “SELF”, “ALL_FRIENDS” and “EVERYONE”. I think the default is SELF. So, setting this to one of the other options would help.

but does privacy come into play when posting in groups ?

it was not an issue of privacy my fb app was in devlopment :smiley: