0.6.1 • Published 4 years ago

node-facebook v0.6.1

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

node-facebook

All Contributors

FOSSA Status shield NPM Version NPM Downloads License

Travis Codecov Code style CodeFactor

FOSSA Status large

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js.

Installation is done using npm or yarn:

$ npm install node-facebook
or
$ yarn add node-facebook

Follow node-facebook's wiki for more information.

Feature

This module have function same you use browser.

Usage

  • In first time, you should login with email and password:

  • When you logged in, use api.getState() to save cookie with this code:

const fs = require('fs');
const Facebook = require('node-facebook');

const me = new Facebook({email: 'your username/id', pass: 'your pass'});
me.login()
  .then((api) => {
    fs.writeFileSync('state.json', JSON.stringify(api.getState()));
  });
  • Now, you can login with cookie with file state.json:
const me = new Facebook({state: JSON.parse(fs.readFileSync('state.json', 'utf8'))});

Example

kiat-bot is sample use node-facebook

Credits

node-facebook has been inspired by facebook-chat-api Thanks to Avery Morin for excellent prior art !

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

0.6.1

4 years ago

0.6.0

4 years ago

0.5.10

5 years ago

0.5.9-alpha.1

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.2

5 years ago

0.5.1-rc3

5 years ago

0.5.1-rc2

5 years ago

0.5.1-rc1

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.2.3

5 years ago

0.2.2-fix

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago