A Chatbot for Facebook Page.
-
Create a Facebook Page.
-
Get the access token and verify token from the Facebook page.
-
On the Webhooks panel, subscribe to the
messages
. -
On the Messenger panel, under the Settings, fill in the
Callback URL
andVerify token
. For example:- Callback URL: https://weesan.serveo.net/webhook
- Verify token: TOKEN
$ ssh -R weesan:80:localhost:5000 serveo.net
$ export ACCESS_TOKEN="..."
$ export VERIFY_TOKEN="TOKEN"
$ ./chatbot
- Go the Facebook page or use the Facebook Messenger.
- Search for the Facebook page.
- Start chatting with the chatbot.
For example:
Me: Hi
Bot: Greetings! Welcome to ELSA!
Bot: To search for a product, please type its name!
Me: red nike tennis shoes
Bot: Which store?
Me: Nike
Bot: What category?
Me: Shoes
Bot: Which store?
Me: Nike
Bot: <show a list of matched shoes from Nike store>