File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments