# stream to facebook server side config

**URL:** <https://community.wowza.com/t/stream-to-facebook-server-side-config/207>\
**Category:** Wowza Streaming Engine\
**Created:** [July 1, 2016, 1:50am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207 "2016-07-01T01:50:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [July 1, 2016, 1:50am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/1 "2016-07-01T01:50:03Z")

</div>

Hello

i’m very excited about the stream to facebook feature. however, i’m wondering how is it possible to setup this without going in wowza admin, as the interesting usage would be to allow users to configure their own streams from a custom app

i havent read the doc though, maybe the answer is inside, will take a look after upgrades

any information appreciated anyway 🙂

thank you !

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 1, 2016, 3:18am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/2 "2016-07-01T03:18:41Z")

</div>

ok, after a few readings using the REST api i can add new stream targets programmatically…but what about the facebook login for each user ? what should be the authorization scope ? i mean, how to create the fb login button that will tell facebook that the stream target must be broadcasted to the wall of the user login in ?

hope i made myself clear

thanks !

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 1, 2016, 5:59am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/3 "2016-07-01T05:59:55Z")

</div>

ok, almost done…have a problem specifying target is facebook in the json…any help appreciated…

thank you 🙂

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 1, 2016, 8:53am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/4 "2016-07-01T08:53:11Z")

</div>

ok found it: profile: rtmp-facebook

now i have (last) problem: facebook token is not accepted. the process i’m following is requesting an access token with scope publishs\_actions with the javascript sdk, then with this token retrieve the stream id and url. so far so good. then i launch the rest call with provided infos, and the token is refused…my facebook app is still in dev mode since publishs\_actions havent been accepted, could it be related ? weird though as i’m using the same app to post in groups and while in dev mode i can still do what i need using the same facebook profile…

logs:

```auto
Token Failed. Please re-login to acquire a new user token and Save target

```

i noticed that the token generated when using the stream to fb from wowza manager doesnt start like mine (there is a ENC-xxxxx) at the begining, while mine is just a long string without any “-” in it…is there a specific token that should be requested ?

thank you !

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 1, 2016, 11:17am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/5 "2016-07-01T11:17:39Z")

</div>

been checking the validity of my token for publish\_actions, everything’s good for my account despite being in dev mode…any clue why my token can be refused wowza side ?

thank you very much

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 3, 2016, 9:38am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/6 "2016-07-03T09:38:11Z")

</div>

after login to FB, u must make a call to the live video api to get the stream url and ID:

> FB.api(‘/me/live\_videos’, ‘POST’, {“published”:“true”}, function(response2) {
> 
> // Insert your code here
> 
> console.log(response2);
> 
> fbStreamID = response2.id;
> 
> fbStreamURL = response2.stream\_url;
> 
> });

you need to configure your facebook app for the live video api also, otherwise your user token will be invalid (well, i guess. so far i’m still waiting for the confirmation of this part from facebook)

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 4:59am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/7 "2016-07-04T04:59:18Z")

</div>

hello

is it normal that not all variables defined in the json appear in the map file.

my json looks like:

> $json = "{
> 
> “restURI”: “http://:8087$server/v2/servers/\_defaultServer\_/vhosts/\_defaultVHost\_/applications/$appName/pushpublish/mapentries/$entryName”,
> 
> “serverName”:“_defaultServer_”,
> 
> “appName”: “$appName”,
> 
> “appInstance”: “$roomID”,
> 
> “sourceStreamName”: “$streamName”,
> 
> “entryName”: “$entryName”,
> 
> “profile”: “$profile”,
> 
> “host”: “$fbStreamURL”,
> 
> “application”:“$appName”,
> 
> “streamName”:“$streamName”,
> 
> “facebook.accessToken”: “$fbToken”,
> 
> “facebook.privacy”: “onlyMe”,
> 
> “facebook.title”: “$nom”,
> 
> “facebook.destId”: “$fbID”,
> 
> “facebook.destType”: “timeline”,
> 
> “facebook.streamId”: “$fbStreamID”,
> 
> “destinationName”: “facebook”,
> 
> “facebook.description”: “$desc”,
> 
> “facebook.destName”: “facebook”,
> 
> “facebook.streamURL”: “$fbStreamURL”
> 
> }'";

the following entries are not present in the pushPublishMap file:

facebook.streamId

facebook.streamURL

destinationName

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 7:49am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/8 "2016-07-04T07:49:31Z")

</div>

something strange on a test:

i created the streamTarget using the rest api with the previous json request. as usual, stream creation is ok, but have error in manager, and token error in wowza logs.

then in the manager, i edited this streamtarget, without actually doing changes: just click edit and saved…nothing changed in the pushmap (same token, same vars & values), but magically my stream is now live on facebook…

i suspect there is a missing parameter in the json call, any clue ?

thank you

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 8:46am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/9 "2016-07-04T08:46:17Z")

</div>

sorry, pushMap file changed: the token generate from wowza manager start with “ENC-”…the one received from facebook login dont…where does this ENC- token comes from

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 11:22am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/10 "2016-07-04T11:22:40Z")

</div>

i noticed that the value of “facebook.destId” is not the same depending i’m creating the stream with the API or from the manager. i’m using the same facebook account to login though…any thoughts ?

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 11:50am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/11 "2016-07-04T11:50:45Z")

</div>

hello

any chance to get some clarifications from Wowza team ?

so far here are the differences i noticed when using API or manager to create a facebook stream target

1: token generated by facebook login is not the same (looks encrypted in the PushMap file). and while my token looks ok for publish\_action permissions, have a token invalid error server side

2: some values specified in the json call are not present in the pushmap file (facebook.streamURL, destinationName, facebook.streamId)

any help appreciated

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 12:29pm UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/12 "2016-07-04T12:29:11Z")

</div>

to make a long story short, this request:

```auto
$json = "{
\"restURI\": \"http://$server:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/$appName/pushpublish/mapentries/$entryName\",
\"serverName\":\"_defaultServer_\",
\"appName\": \"$appName\",
\"appInstance\": \"$roomID\",
\"sourceStreamName\": \"$streamName\",
\"entryName\": \"$entryName\",
\"profile\": \"$profile\",
\"host\": \"$fbStreamURL\",
\"application\":\"$appName\",
\"streamName\":\"$streamName\",
\"facebook.accessToken\": \"$fbToken\",
\"facebook.privacy\": \"$facebookPrivacy\",
\"facebook.title\": \"$nom\",
\"facebook.destId\": \"$fbID\",
\"facebook.destType\": \"$destinationType\",
\"facebook.streamId\": \"$fbStreamID\",
\"destinationName\": \"facebook\",
\"facebook.description\": \"$desc\",
\"facebook.destName\": \"facebook\",
\"facebook.streamURL\": \"$fbStreamURL\"
}'";

```

generate this code:

```auto
61245695458031={"entryName":"FB61245695458031", "profile":"rtmp-facebook", "application":"videochat", "facebook.accessToken":"xxxxx", "host":"rtmp://rtmp-api.facebook.com:80/rtmp/xxx?ds=1&a=xxx", "appInstance":"1", "facebook.privacy":"onlyMe", "facebook.title":"My Live", "facebook.destId":"xxx", "facebook.destType":"timeline", "streamName":"61245695458031", "facebook.destName":"facebook"}

```

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 4, 2016, 12:38pm UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/13 "2016-07-04T12:38:47Z")

</div>

stupid question: is it required that rtmp streams uses authentification ? anyway i dont see how it would be related to the token error which is so preventing me from using the facebook feature…

thank you, sorry for all these questions 🙂

---

<div class="post-metadata">

**Author:** ![gabriel\_fg](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gabriel\_fg](https://community.wowza.com/u/gabriel_fg)\
**Post date:** [July 6, 2016, 3:17pm UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/14 "2016-07-06T15:17:55Z")

</div>

as i feared:

> Hello,
> 
> Thank you for contacting Wowza support.
> 
> At this time is it not possible to create Facebook Live stream targets using the REST API. This feature is not currently supported. It is being analyzed by our Product Management team, but at this time I don’t have any timeframe estimation on when this will become supported.

☹

---

<div class="post-metadata">

**Author:** ![Andrea\_Azoto](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@Andrea\_Azoto](https://community.wowza.com/u/Andrea_Azoto)\
**Post date:** [July 2, 2016, 7:50pm UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/15 "2016-07-02T19:50:50Z")

</div>

I’m interested in this features too.

I’ve found how to create the Stream Target rtmp-facebook and it works good but i don’t know how to manage the login info of Facebook

facebook.streamID

facebook.accessToken

facebook.destID

you can find all the necessary variables in this files: /conf/PushPublishMap.txt that store all the info about the Facebook Login .

Any help its appreciated

---

<div class="post-metadata">

**Author:** ![Kristian\_Borgen1](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@Kristian\_Borgen1](https://community.wowza.com/u/Kristian_Borgen1)\
**Post date:** [April 26, 2017, 8:59am UTC](https://community.wowza.com/t/stream-to-facebook-server-side-config/207/16 "2017-04-26T08:59:39Z")

</div>

Is it possible today to Create Facebook live Stream targets using REST API ?
