Coder Social home page Coder Social logo

nodejs-facebook-bot's Introduction

NodeJS Facebook Bot

This is a simple NodeJS based Facebook bot that replies with the text message you send it.

DISCLAIMER

In using this repository, it is assumed that you know how to create, and work with the Facebook interface to be able to leverage their messaging API to create bots.

Prerequisites

To use this application, you need to have the following things:

  1. An Active Facebook Account

    Create a profile here: https://www.facebook.com/

  2. An Active Facebook Bot Account

    Create one here: https://developers.facebook.com/

  3. The Ngrok application to allow tunneling for local development

    Download the application here: https://ngrok.com/download

Usage

  • Clone the repository
git clone https://github.com/devaku/nodejs-facebook-bot
cd nodejs-facebook-bot
  • Then after that, install the node_modules using the provided script
npm run install-server
  • Once the installation is done, make sure to create a .env file, from the given sample

  • Fill it in with the needed details required to run the application

  • To run the application locally, ngrok must be running in the background. Make sure the PORT you provide (from the .env file), is the same PORT you use when running ngrok.

ngrok http 80
  • Once everything is set up just run the following script to get the application started
npm run debug
  • The application is setup to verify the Webhook through the following endpoint
GET /webhook
  • Bot messages will then be received through the following endpoint
POST /webhook
  • Go to Facebook Messenger and talk to your bot, and start a conversation to see it work :D

Credits

nodejs-facebook-bot's People

Contributors

dependabot[bot] avatar devaku avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.