Skip to content

AlMakinah/bot-hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlMakinah bot hackathon

Installation

Part 1: Cloning and Deploying your Bot

  • Clone this repo git clone https://github.com/AlMakinah/bot-hackathon.git
  • Make sure you have nodejs and npm installed
  • cd into your directory and npm install
  • If you don't have account already, signup on heroku
  • Download the heroku toolbelt
  • Create an app on heroku
  • Go to the deploy tab under your heroku app and get your deploy link git remote add heroku <YOUR-DEPLOY-LINK-HERE>
  • Push your code to heroku git push heroku master
  • Go to your app URL in the browser, you should see Hello world, I am a chat bot'

Part 2: Connecting your Bot with Facebook

  • Create a Facebook page if you don't have one already
  • Sign up https://developers.facebook.com/products/messenger
  • Creating Facebook App for Messenger
  • Go to My Apps
  • Click on "Add a New App"
  • Add a "Display Name", "Contact Email" and choose a category for your app
  • Add a "Messenger" App
  • Under "Token Generator" select your page and generate a token.
  • Add the newly generated token in your code and push updates to heroku
  • Setup a webhook, add your heroku app URL under "Callback URL" and your generated token under "Verify Token"
  • if webhook is successful then you have connected your bot to Facebook!

Part 3: Test it

  • Go to your Bot's corresponding Facebook page and send your Bot a Message
  • Sending anything will have it echo it back to you
  • Sending "hi" will show you a catalog of interactive links with predefined answers

Resources

About

A Facebook messenger bot example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published