Facebook Live in IONIC?


#1

Hi all,

it is possible to implement facebook live api in an ionic app ?
this its a documentation of how to use fb live streaming in a web page (javascript)
https://developers.facebook.com/docs/videos/live-video/exploring-live

i already create a ionic app and i follow this steps to add fb angular(typescript) sdk
https://www.npmjs.com/package/ngx-facebook
i try also this package:
https://www.npmjs.com/package/fb-promise-wrapper

i write this code but doesn’t work :

import { FacebookService, InitParams } from 'ngx-facebook';

private fb: FacebookService

let initParams: InitParams = {
  appId: 'MY_APP_ID',
  xfbml: true,
  version: 'v2.10'
};

fb.init(initParams);

and in the button click:

this.fb.ui({
  display: 'popup',
  method: 'live_broadcast',
  phase: 'create',

}).then((response) => {
  if (!response['id']) {
    alert('dialog canceled');
    return;
  }
  alert('stream url:' + response['secure_stream_url']);
  this.fb.ui({
    display: 'popup',
    method: 'live_broadcast',
    phase: 'publish',
    broadcast_data: response,

  }).then((response) => {
    alert("video status: \n" + response['status']);
  })
});

im newer to ionic and cordova, i just ask if its possible live streming to fb timeline by a ionic app, if yes how to ?

Sorry for my english,
and thank you :slight_smile:


#2

I have the same question…
need to launch a facebook live stream from my Ionic app…

Up please ?


#3

Do we have anyone in this whole community who has a solution for this?

I am actually stuck on the same issue.