libfb
Facebook MQTT library for Node.js
Last updated a month ago by bjornskjald .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install libfb 
SYNC missed versions from official npm registry.

libfb-js

Facebook chat MQTT library for Node.js

npm   npm   love

Example usage

Echo bot

const { Client } = require('libfb')
const client = new Client()
client.login('username', 'password').then(() => {
  client.on('message', message => {
    console.log('Got a message!')
    console.log(message.message)
    client.sendMessage(message.threadId, message.message)
  })
})

Chat greeting

const { Client } = require('libfb')
const client = new Client()
client.login('username', 'password').then(() => {
  client.on('participantsAddedToGroupThreadEvent', async event => {
    const user = await client.getUserInfo(event.participantIds[0])
    client.sendMessage(event.threadId, `Hello, ${user.name}!`)
  })
})

Documentation

See here

Updating from 1.x.x

const { login } = require('libfb')
login('username', 'password').then(client => {
  ...
})

becomes

const { Client } = require('libfb')
const client = new Client()
client.login('username', 'password').then(() => {
  ...
})

Disclaimer

We do not guarantee that this product will work correctly. Use only with whitehat accounts for research/educational purposes. We are not responsible for getting banned on Facebook.
MQTT connection logic was based on bitlbee-facebook.
All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
"Facebook" is a registered trademark of Facebook, Inc., used under license agreement.

Current Tags

  • 2.3.4                                ...           latest (a month ago)

46 Versions

  • 2.3.4                                ...           a month ago
  • 2.3.3                                ...           3 months ago
  • 2.3.2                                ...           3 months ago
  • 2.3.1                                ...           3 months ago
  • 2.3.0                                ...           3 months ago
  • 2.2.0                                ...           3 months ago
  • 2.1.1                                ...           4 months ago
  • 2.1.0                                ...           4 months ago
  • 2.0.9                                ...           4 months ago
  • 2.0.8                                ...           4 months ago
  • 2.0.7                                ...           5 months ago
  • 2.0.6                                ...           5 months ago
  • 2.0.5                                ...           5 months ago
  • 2.0.4                                ...           5 months ago
  • 2.0.3                                ...           5 months ago
  • 2.0.2                                ...           5 months ago
  • 2.0.1                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 1.4.12                                ...           5 months ago
  • 1.4.11                                ...           6 months ago
  • 1.4.10                                ...           9 months ago
  • 1.4.9                                ...           9 months ago
  • 1.4.8                                ...           9 months ago
  • 1.4.7                                ...           9 months ago
  • 1.4.6                                ...           9 months ago
  • 1.4.5                                ...           9 months ago
  • 1.4.4                                ...           9 months ago
  • 1.4.3                                ...           9 months ago
  • 1.4.2                                ...           9 months ago
  • 1.4.1                                ...           9 months ago
  • 1.4.0                                ...           9 months ago
  • 1.3.9                                ...           10 months ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           a year ago
  • 1.3.5 [deprecated]           ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 113
Dependencies (9)
Dev Dependencies (19)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |