2016-11-11 28 views
0

我想通過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調用時通過,但他們沒有提到的,適當的文件。

請幫我:)

+0

Facebook Live API要求使用唯一的應用程序ID來生成訪問令牌。當您創建/更新流目標(啓動Facebook登錄窗口)時,此令牌協商將從Wowza Streaming Engine Manager UI進行處理,然後作爲Wowza流目標中的屬性添加,以允許其發佈到Facebook頁面。令牌不能從REST API創建。您需要在外部使用Facebook API處理令牌管理。一旦你擁有了必要的訪問令牌,你就可以通過REST API將其填充到你的Wowza流目標中。 –

回答

0

以下參數可用於通過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及以上版本。

+0

謝謝阿斯拉姆我在你的方式做它它可以幫助我。 –

+0

嗨! Ayaz我正在使用wowza 4.6這個解決方案還有效嗎?我正在做同樣的事情,但在流目標中出現錯誤。似乎不接受令牌。 當使用wowza流式引擎登錄facebook時,在發佈地圖文件中生成的令牌奇怪,例如日誌中的「ENC-xxxx」 正在拋出此錯誤 PushPublishFacebookUtil.getTokenInfo:GET路徑:v2.6/debug_token結果:400 – Usama

+0

嗨,Usama,它應該仍然適用於版本4.6。請確保您使用的Facebook訪問令牌具有發佈視頻的必要權限。 –

相關問題