facebook-promise
v0.1.6
Published
Loads the Facebook SDK asynchronously and returns it as a Promise.
Downloads
10
Maintainers
Readme
Facebook Promise
Loads the Facebook SDK asynchronously and returns it as a Promise.
Installation
npm install facebook-promise --save
Usage
import FBPromise from 'facebook-promise';
// Declare a Facebook Promise and load the Facebook SDK asynchronously
const facebook = new FB8Promise({
language: 'en_US',
debug: false,
});
facebook.then((FB) => {
// Initialize SDK
FB.init()
});
or
import facebook from 'facebook-promise';
facebook().then((FB) => {
// Initialize SDK
FB.init()
});
License
MIT