Skip to content

masnun/fb-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Facebook Messenger EchoBot Example

Install Dependencies

Install flask & requests using pip:

	pip install Flask
	pip install requests

Install ngrok from - https://ngrok.com/.

Run Server & Tunnel Connection

Run the dev server using:

python server.py

Use ngrok to tunnel the connection.

ngrok http 5000

You shall see the url for your local server. Something like: https://6cecffb8.ngrok.io.

Setup Facebook App & Access Token

  • Create a Facebook App.
  • Add the Messenger Product.
  • Enable webhooks. Use the above URL as the callback webhook URL.
  • Edit server.py and update the VERIFY_TOKEN with the token you set.
  • Once the callback is verified, subscribe the app to one of your pages.
  • Also generate a page access token for that page.
  • Edit server.py and update the ACCESS_TOKEN with the new token we got.

About

Facebook messenger bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages