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