RyanC
RyanC

Reputation: 21

Facebook Live API - Pairing Encoder - Invalid parameter

I am working my way through setting up a paired encoder for Facebook Live. Following https://developers.facebook.com/docs/videos/live-video/getting-started/#pairing and https://developers.facebook.com/docs/graph-api/reference/live-encoder/. I have been able to register the encoder and get a FBID, and broadcast_id. I am stuck at the "status:capture" point. Facebook send the {action:"capture"} response, but when the encoder responds with the video parameters, I get an error {message (#100) Invalid parameter, type OAuthException, code 100} I am currently testing using the Graph API Explorer, but I get the same error with my scripts. I am not sure what parameter is invalid...

Thanks!

Here is what I am sending (with a valid token):

status CAPTURE

broadcast_id **************

cap_streaming_protocols rtmp

cap_audio_codecs aac

cap_video_codecs h264

input_video_width 1920

input_video_height 1080

input_video_framerate 30000/1001

input_audio_samplerate 48000

input_audio_channels 2

Here my code snippet:

     $.ajax({
        method: 'POST',
        url: "//graph.facebook.com/"+fbid+"?access_token="+fbToken,
        data: {
           'status':'CAPTURE',
           'broadcast_id': broadcast_id,
           'cap_streaming_protocols': 'rtmp',
           'cap_audio_codecs':'aac',
           'cap_video_codecs':'h264',
           'input_video_width': '1920',
           'input_video_height': '1080',
           'input_video_framerate': '30000/1001',
           'input_audio_samplerate': '48000',
           'input_audio_channels': '2'
        },
    }).done(function(response){
           console.log(response);
           $('#link').html(response);
    });

Upvotes: 1

Views: 960

Answers (1)

Paul Siegel
Paul Siegel

Reputation: 1

I just hit this today. As of this moment, cap_streaming_protocols=rtmps is the only value it accepts. If you need the rtmp url you can get that using the broadcast_id on the live_video edge. The rest looks like it should work.

Upvotes: 0

Related Questions