2

I have integrated an existing streaming application with Facebook, but am facing a final hurdle. My software doesn't have an API to change the streaming key. So I use a Persistent Key for Youtube, and also for Facebook.

However, I want to automate the whole system and I cannot find how to use the Persistent Streaming Key (PSK) with Facebook icm the Graph API.

I schedule an event, but when I start streaming to the PSK the connection is rejected. It does work however if I go to the Facebook Page and open the Live Producer for the scheduled stream. Straight away the stream is accepted and seems to be connected to the stream originally assigned to the LiveVideo (or at least that is how is seems).

Is there a way to allow the PSK to be accepted without the manual intervention of opening the Live Producer page? I don't seem to be able to find anything.

Luuk D. Jansen
  • 4,402
  • 8
  • 47
  • 90

2 Answers2

1

Is there a way to allow the PSK to be accepted without the manual intervention of opening the Live Producer page?

Unfortunately, no.

Your automation really needs to tie into the rest of the Facebook Live API so that you can create/start streams. It isn't possible to use RTMP alone, even with the persistent stream key.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • Thanks @Brad. Is there a way to do it with the API without manual intervention of a person? I use the Graph API to schedule the event and monitor the feed. My only problem is that my streaming software doesn't have an API to update the streaming key so I can change it to the one of the scheduled event, and as such want to use a persistent one. – Luuk D. Jansen Jan 12 '21 at 09:25
  • @LuukD.Jansen Yes, you just need to make a new `POST` to set the status to `LIVE_NOW`. https://developers.facebook.com/docs/live-video-api/guides/scheduling#starting-a-broadcast-immediately – Brad Jan 12 '21 at 19:52
  • I tried that as well, but it still doesn't connect to the Persistent Key and the status changes from SCHEDULED_PREVIEW to SCHEDULED_LIVE, but does not accept the stream using the persistent key. – Luuk D. Jansen Jan 13 '21 at 10:05
  • @LuukD.Jansen Hmm, sorry, I'm not sure then. The API has likely changed since I last poked at it. – Brad Jan 14 '21 at 00:38
  • @LuukD.Jansen I have encountering the same problem as well. I get No permission to use persistent stream key param when I try to set the permission even though I have publish_video permission granted. – BrandonG Oct 02 '22 at 22:10
1

Recently, usage of PERSISTENT STREAMING KEYS has been enabled by Facebook. Here is the detail: https://www.facebook.com/formedia/blog/new-live-tools-for-publishers-persistent-stream-keys-crossposting-and-live-rewind

There is no documentation anywhere, but it looks the LiveVideo object's stream key can be updated to PERSISTENT STREAMING KEY via POST endpoint on LiveVideo object

checkout this link on Facebook developer - the return value of LiveVideo object has PERSISTENT STREAMING KEY - https://developers.facebook.com/docs/graph-api/reference/live-video#Updating

Ratan Nahn
  • 90
  • 7
  • 1
    I haven't found a way to get the persistent stream to 'link' to the master. It works when I go to the Live Producer Page, and straight away starts working (and using a Graph query it seems to go through the stream unique to the LiveVideo). But I cannot find a way to doit with our going to the page (but will double check tomorrow if the persistent key given in the POST result is the same as the one when going to the Live Producer) – Luuk D. Jansen Jan 17 '21 at 21:23
  • I tried to do a post, but didn't;t get the persistent key in the return, and putting it as a field in the post returns an error. So I don't know how to get that value. (110721280977824?fields=persistent_stream_url returns Tried accessing nonexisting field (persistent_stream_url) on node type (LiveVideo) – Luuk D. Jansen Jan 18 '21 at 15:25