JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 223
  • Score
    100M100P100Q100120F
  • License MIT

NodeJS Facebook Messenger API for bots to send messages and setup events to Facebook.

Package Exports

  • fb-messenger-bot-api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fb-messenger-bot-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fb-messenger-bot-api

NodeJS Facebook Messenger API

version travis build codecov coverage Codacy Badge dependency status MIT License semantic-release Commitizen friendly stability-stable Greenkeeper JavaScript Style Guide

Installation

npm install fb-messenger-bot-api

Setup

Import

const MessengerClient = require('fb-messenger-bot-api');

Initialize

const fbClient = new MessengerClient(process.env.PAGE_ACCESS_TOKEN);

Using proxy

const fbClient = new MessengerClient(process.env.PAGE_ACCESS_TOKEN, { hostname:process.env.PROXY_HOST, port: process.env.PROXY_PORT });

Creating facebook app

See facebook tutorial

Messenger Profile

Setting Greeting Message

fbClient.setGreetingMessage('Message that will be visible first thing when opening chat window with your bot/page')
.then(...)