stream to facebook server side config

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 :slight_smile:

thank you !

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 !

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

thank you :slight_smile:

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:

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 !

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

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)

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

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

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

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 ?

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

to make a long story short, this request:

$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:

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"}

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 :slight_smile:

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.

:frowning:

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

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