Skip to content

Exploration around conversational interfaces and finate state machines, as part of a nice hackathon trip to Sweden.

Notifications You must be signed in to change notification settings

vunb/chatbot-hackathon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook chatbots: what do they do? do they do things? let's find out

Exploration around conversational interfaces and finate state machines, as part of a nice hackathon trip to Sweden.

Prepare

Create a Facebook App and a Facebook Page, get the credentials, attach a webhook - e.g. with now, https://my-app.now.sh/messenger/webhook

Credentials (inject as environment variables):

  • VERIFY_TOKEN: can be any string, need to be inserted here and in FB admin UI
  • PAGE_TOKEN: get that from Messanger settings of your Facebook App admin UI
  • FB_APP_SECRET: get that from your Facebook App admin UI

Develop

When in development, you can e.g. use ngrok to use as the webhook URL, e.g. https://e0931885.ngrok.io/messenger/webhook. Then run like this:

VERIFY_TOKEN=<token> PAGE_TOKEN=<token> FB_APP_SECRET=<token> DEBUG=botmaster:* yarn nodemon app.js

Chatbot description

Very simple indeed - waits to be greeted, invites to play a game, asks one question and waits for correct answer, then forgets you talked.

States diagram looks like this (generated using javascript-state-machine's visualisation feature and GraphvizOnline):

For "smart" features uses:


Sweden was nice!

About

Exploration around conversational interfaces and finate state machines, as part of a nice hackathon trip to Sweden.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%