Skip to content

ddrdushy/fbChatBotBoilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Messenger Platform Sample -- node.js

This project is an example server for Messenger Platform built in Node.js. With this app, you can send it messages and it will echo them back to you. You can also see examples of the different types of Structured Messages.

It contains the following functionality:

  • Webhook (specifically for Messenger Platform events)
  • Send API
  • Web Plugins
  • Messenger Platform v1.1 features

Follow the walk-through to learn about this project in more detail.

Setup

Step 1:

go to Glitch.com

step1

Step 2:

Login with facebook or github.

step2

Step 3:

Create new express project

step3

Step 4:

Go to Advance options

step4

Step 5:

Select import from github

step5

Step 6:

Enter the github repo as ddrdushy/fbChatBotBoilerplate

step6

Step 7:

Need to change the values in config/default.json values

step7

Step 8:

Create new app in Facebook developer page

step8

step8_1

step8_2

Step 9:

Create new app ID

step9

Step 10:

Select messenger in dashboard.

step10

step10

Step 11:

Select the page which you need to intergrate this bot.

step11

step11_1

Face book will generate an access token for the particular page. copy that token and replace it in config file.

step11_2

Step 12:

Go to setting section in dashboard. get the App Secret and place it in the config file.

step12

step12_1

make sure that bot is in live Status.

step12_2

Step 13:

Copy the Glitch project URL. go to messenger settings under products menu and click on Setup Webhooks.

step13

step13_1

Paste the callback URL as Glitch project URL and add webhook at the end of the URL as shown in the below picture. and tick on messages and messaging_postbacks.

step13_2

step13_3

Step 14:

Go to Facebook Messenger and search for the page name and start using the Chatbot.

step14

Successfully deployed the chatbot.

step14_1

step14_2