This package has been deprecated

Author message:

This package has been deprecated as there are many better alternatives now than there were when it was originally published years ago.

facebook-login

1.4.1 • Public • Published

facebook-login

A light-weight wrapper for client-side facebook login using promises rather than callbacks.

Features

  • Supports all the configuration options that the Facebook Javascript SDK does.
  • Promise-based API calls instead of callbacks.
  • Surfaces login and getLoginStatus calls.

Installing

Using npm:

$ npm install facebook-login

Usage

import facebookLogin from 'facebook-login';
 
const api = facebookLogin({ appId: 'your-app-id-here' });
 
// to trigger the login flow
api.login().then((response) => console.log(response));
 
// to check if the user is connected
api.getLoginStatus().then((response) => console.log(response));
 
// to indicate when the SDK is done loading
api.whenLoaded().then(() => console.log('loaded!'));

Contributing

File an issue or submit a pull-request. Before submitting any pull-requests please ensure you've built the project and run the tests.

To build the project

webpack

Running the tests

karma start

Contribute a change by submitted a pull-request

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT

Dependents (4)

Package Sidebar

Install

npm i facebook-login

Weekly Downloads

90

Version

1.4.1

License

MIT

Unpacked Size

68.6 kB

Total Files

11

Last publish

Collaborators

  • npm