alkesh47 / calories

:poultry_leg: a Facebook Messenger bot in Golang for all your calorie-tracking needs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calories

WIP

Setup

  1. Make sure you have Go and the Heroku CLI installed
  2. Clone the repository into $GOPATH/src/github.com/bobheadxi
  3. If you aren't a repository collaborator, you will have to create your own Heroku and Postgres instance:
heroku create
heroku config:set HEROKU_URI=your-heroku-uri
heroku config:set DATABASE_URL=your-database-url
  1. Now you have to set up your Facebook app page. Create a Facebook page for your app at https://developers.facebook.com/apps/
  2. Click on "Messenger" under "Products". Generate a token under "Token Generation", and set up Webhook under "Webhooks". Use the URL of your Heroku server as your webhook URL (append /webhook to the end). Make sure you at least subscribe to messages and messaging_postbacks.
  3. Save your tokens as Config Variables on Heroku. These are required for the app to run.
heroku config:set FB_PAGE_ID=your-page-id
heroku config:set FB_TOKEN=your-fb-token
  1. With all this set up, you should be good to go! Deploy the bot to your Heroku instance:
git push heroku dev:master

Now you can message your Facebook page to try out the bot. Note that until your application gets submitted for review and accepted, other users will have to be added as testers before the bot will respond to them.

About

:poultry_leg: a Facebook Messenger bot in Golang for all your calorie-tracking needs

License:MIT License


Languages

Language:Go 100.0%