Coder Social home page Coder Social logo

facebook-messenger-devkit's Introduction

DevKit

Facebook Messenger DevKit

What?

Setup for rapid development of bots for Facebook Messenger.

What's the trick?

Facebook Messenger works via https, so the possibilities of local development are limited. In case you iterate fast you need to constantly redeploy your app to remote https-powered server (like Heroku, for example).

How DevKit works?

DevKit requires you to set up your app with webhook handler once. After that you have access to the stream of events via eventsource. There're two files: server.js is meant to be spinned on the remote https-powered server, while index.js ought to be run locally and include your bot's logic.

What about production?

You'd better get rid of eventsource proxy in production. It's trival task and it's up on you.

Step-by-step tutorial

  1. Create app on Facebook

  2. Add the Validation Token and remember it as MESSENGER_VALIDATION_TOKEN for step 5

  3. Deploy

  4. Go to your Facebook app settings and navigate to Webhook tab. Add your newly created Heroku app as webhook.

  5. Set up MESSENGER_VALIDATION_TOKEN in Heroku Dashboard under Settings tab (you need to click 'Reveal Config Vars')

  6. Get the app url and add it to index.js as HEROKU_APP_URL

  7. Read the Messenger Platfrom docs and go build something cool!

Project Roadmap

  1. Better docs

  2. Reusable factory functions for common tasks

facebook-messenger-devkit's People

Contributors

olegakbarov avatar

Watchers

James Cloos 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.