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

**URL:** <https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928>\
**Category:** Wowza Developer Dojo\
**Created:** [September 8, 2019, 2:53pm UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928 "2019-09-08T14:53:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yehan\_Pemarathne](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@Yehan\_Pemarathne](https://community.wowza.com/u/Yehan_Pemarathne)\
**Post date:** [September 8, 2019, 2:53pm UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/1 "2019-09-08T14:53:05Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [September 9, 2019, 6:49pm UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/2 "2019-09-09T18:49:13Z")

</div>

Hi [@Yehan Pemarathne](http://community.wowza.com/community/questions/52893/how-can-i-create-a-facebook-live-stream-target-thr.html#), 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](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](https://www.wowza.com/docs/how-to-stream-to-facebook-live-from-wowza-streaming-cloud)

---

<div class="post-metadata">

**Author:** ![Yehan\_Pemarathne](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@Yehan\_Pemarathne](https://community.wowza.com/u/Yehan_Pemarathne)\
**Post date:** [September 10, 2019, 2:33am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/3 "2019-09-10T02:33:21Z")

</div>

Hi [@Rose Power-Wowza Community Manager](http://community.wowza.com/community/questions/52893/view.html#), 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?

---

<div class="post-metadata">

**Author:** ![Yehan\_Pemarathne](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@Yehan\_Pemarathne](https://community.wowza.com/u/Yehan_Pemarathne)\
**Post date:** [September 10, 2019, 4:16am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/4 "2019-09-10T04:16:56Z")

</div>

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/](https://flashphoner.com/broadcast-video-stream-from-web-page-to-facebook-and-youtube-simultaneously/)

---

<div class="post-metadata">

**Author:** ![Yehan\_Pemarathne](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@Yehan\_Pemarathne](https://community.wowza.com/u/Yehan_Pemarathne)\
**Post date:** [September 10, 2019, 7:24am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/5 "2019-09-10T07:24:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mahitej\_Gangaraju](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mahitej\_Gangaraju](https://community.wowza.com/u/mahitej_Gangaraju)\
**Post date:** [January 22, 2020, 2:08pm UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/6 "2020-01-22T14:08:30Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![mahitej\_Gangaraju](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mahitej\_Gangaraju](https://community.wowza.com/u/mahitej_Gangaraju)\
**Post date:** [January 22, 2020, 2:08pm UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/7 "2020-01-22T14:08:24Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Yehan\_Pemarathne](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@Yehan\_Pemarathne](https://community.wowza.com/u/Yehan_Pemarathne)\
**Post date:** [January 23, 2020, 3:42am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/8 "2020-01-23T03:42:38Z")

</div>

@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

```auto
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.

---

<div class="post-metadata">

**Author:** ![Phil\_Londrico1](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Phil\_Londrico1](https://community.wowza.com/u/Phil_Londrico1)\
**Post date:** [January 23, 2020, 6:38am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/9 "2020-01-23T06:38:54Z")

</div>

but does privacy come into play when posting in groups ?

---

<div class="post-metadata">

**Author:** ![mahitej\_Gangaraju](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mahitej\_Gangaraju](https://community.wowza.com/u/mahitej_Gangaraju)\
**Post date:** [January 23, 2020, 9:21am UTC](https://community.wowza.com/t/how-can-i-create-a-facebook-live-stream-target-through-wowza-streaming-cloud-api/53928/10 "2020-01-23T09:21:51Z")

</div>

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