如何在wowza中使用rest api添加流目标到Facebook?
我想通过wowza rest api(/ v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/pushpublish/mapentries)创建Facebook流。如何在wowza中使用rest api添加流目标到Facebook?
Parameters `{
"shoutcast.destination": "",
"icecast2.public": false,
"akamai.destinationServer": "",
"shoutcast.icq": "",
"facebook.eventSourceName": "",
"timeToLive": 0,
"password": "",
"facebook.destType": "",
"rtpWrap": false,
"icecast2.name": "",
"akamai.hostId": "",
"icecast2.icq": "",
"host": "",
"connectionFlashVersion": "",
"cupertino.renditions": "",
"facebook.title": "",
"debugPackets": false,
"shoutcast.public": false,
"shoutcast.aim": "",
"profile": "",
"icecast2.description": "",
"sessionStatus": "",
"shoutcast.metaname": "",
"icecast2.genre": "",
"facebook.destId": "",
"queryString": "",
"akamai.eventName": "",
"version": "",
"shoutcast.name": "",
"sendStreamCloseCommands": false,
"port": 0,
"sendFCPublish": false,
"icecast2.aim": "",
"http.playlistCount": 0,
"http.playlistTimeout": 0,
"facebook.destName": "",
"audioPort": "",
"icecast2.metaname": "",
"sourceStreamName": "",
"connectionCode": "",
"localBindAddress": "",
"shoutcast.protocol": "",
"debugLogChildren": false,
"serverName": "",
"adaptiveStreaming": false,
"facebook.eventSourceType": "",
"enabled": false,
"shoutcast.irc": "",
"sendReleaseStream": false,
"shoutcast.url": "",
"icecast2.irc": "",
"facebook.description": "",
"debugLog": false,
"shoutcast.genre": "",
"akamai.streamId": "",
"akamai.hdNetwork": false,
"adaptiveGroups": "",
"saveFieldList": [
""
],
"http.playlistAcrossSessions": false,
"secureTokenSharedSecret": "",
"http.fakePosts": false,
"sendSSL": false,
"sendOriginalTimecodes": false,
"icecast2.destination": "",
"facebook.accessToken": "",
"userName": "",
"facebook.privacy": "",
"streamName": "",
"removeDefaultAppInstance": false,
"videoPort": "",
"http.writerDebug": false,
"icecast2.url": "",
"akamai.sendToBackupServer": false,
"destinationServer": "",
"application": "",
"entryName": "",
"streamWaitTimeout": 0,
"appInstance": "",
"originalTimecodeThreshold": "",
"autoStartTranscoder": false,
"sanjose.representationId": ""
}`
按照该API文档他们是很多参数的,我有API调用时通过,但他们没有提到的,适当的文件。
请帮我:)
以下参数可用于通过REST API来创建一个Facebook流目标。 (/ V2 /服务器/ {服务器名} /虚拟主机/ {vhostName} /应用/ {APPNAME}/pushpublish/mapentries)
{
"entryName": "fb-api",
"profile": "rtmp-facebook",
"sourceStreamName": "{StreamName}",
"facebook.title": "Live Test",
"facebook.destType": "timeline",
"facebook.destId": "{DestinationPageId}",
"facebook.destName": "My Timeline",
"facebook.description": "This is Wowza live test",
"facebook.accessToken": "{FacebookAccessToken}",
"facebook.privacy": "onlyMe",
"extraOptions": {
"destinationName": "facebook"
},
"enabled": true
}
如果你有机会到安装Wowza文件系统,你可以看到所有在\ conf \ {appName} \ PushPublishMap.txt文件中创建的流目标。您可以通过Wowza流引擎接口来配置流目标,并打开该文件,以使用REST API了解特定类型流目标的必需参数。
请注意,这适用于Wowza Streaming Engine 4.5及以上版本。
谢谢阿斯拉姆我在你的方式做它它可以帮助我。 –
嗨! Ayaz我正在使用wowza 4.6这个解决方案还有效吗?我正在做同样的事情,但在流目标中出现错误。似乎不接受令牌。 当使用wowza流式引擎登录facebook时,在发布地图文件中生成的令牌奇怪,例如日志中的“ENC-xxxx” 正在抛出此错误 PushPublishFacebookUtil.getTokenInfo:GET路径:v2.6/debug_token结果:400 – Usama
嗨,Usama,它应该仍然适用于版本4.6。请确保您使用的Facebook访问令牌具有发布视频的必要权限。 –
Facebook Live API要求使用唯一的应用程序ID来生成访问令牌。当您创建/更新流目标(启动Facebook登录窗口)时,此令牌协商将从Wowza Streaming Engine Manager UI进行处理,然后作为Wowza流目标中的属性添加,以允许其发布到Facebook页面。令牌不能从REST API创建。您需要在外部使用Facebook API处理令牌管理。一旦你拥有了必要的访问令牌,你就可以通过REST API将其填充到你的Wowza流目标中。 –