This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

facebook-sdk-promise

1.2.2 • Public • Published

facebook-sdk-promise

Load Facebook's SDK and return a Promise. If it's already loading it won't try to load it again.

Install

npm i --save facebook-sdk-promise

Usage

import loadFBSDK from 'facebook-sdk-promise';
loadFBSDK().then(FB => {
    console.log('Facebook SDK has loaded!', FB);
})

Enable or disable the internal logging

import loadFBSDK from 'facebook-sdk-promise';
// it starts "off"
loadFBSDK.logging.on();
// [FB API] Facebook SDK script not found, loading now. Add this in the document to have the API available sooner: <script src="//connect.facebook.net/en_US/sdk.js" async></script>
// [FB API] Waiting to be ready
// [FB API] Ready

Build

The project is in ES6 but transformed into ES5 with rollup-babel-lib-bundler. To do that, run:

npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i facebook-sdk-promise

Weekly Downloads

33

Version

1.2.2

License

MIT

Unpacked Size

4.67 kB

Total Files

5

Last publish

Collaborators

  • fregante