Skip to content

Commit d97bd75

Browse files
authored
Create HOWTO.md
how to setup jetty, ngrok, fb webhook and then test the bot
1 parent a77db2d commit d97bd75

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

HOWTO.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
##How to deploy locally
2+
- checkout and export this project as maven project in eclipse
3+
- create a run configuration for this project
4+
- with goals: `jetty:run -Djetty.port=9090`
5+
- with name: `Java-FbChatBot`
6+
- with base directory: `${workspace_loc:/Java-FbChatBot}`
7+
- you can change the port (9090) to whatever you want
8+
- check your project
9+
- [home](http://localhost:9090/bot/)
10+
- [webhook](http://localhost:9090/bot/webhook?hub.verify_token=whatever_string_you_or_your_friends_wish&hub.challenge=your_name)
11+
12+
13+
##run on ngrok
14+
- now you have to setup [ngrok](https://ngrok.com/) which is the easiest way to expose your local server to the world
15+
- now run ngrok for port 9090 as `ngrok http -subdomain=mybot -log=stdout 9090`
16+
- check your project
17+
- [home](https://mybot.ngrok.io/bot/)
18+
- [webhook](https://mybot.ngrok.io/bot/webhook?hub.verify_token=whatever_string_you_or_your_friends_wish&hub.challenge=your_name)
19+
- now add webhook url as show in [fb tutorial](https://developers.facebook.com/docs/messenger-platform/implementation#setup_webhook)
20+
21+
##output in fb messenger
22+
- once you are done with fb webhook setup, you can message on your page and will get automated replies as shown in pictures below
23+
24+

0 commit comments

Comments
 (0)