Dead-simple wrapper to get Chatterbot running in Heroku in as little as 5 minutes
- Click the Fork button here https://github.com/staringispolite/heroku-twitter-bot
- git clone to your local machine
- https://apps.twitter.com/
- Enter the into to create a new app
- Run
bundle install
to install dependencies - In the top level of the new bot repo, type
chatterbot-register
and follow the directions on-screen to OAuth the bot to your app. Make sure when you follow the OAuth link in your browser to authorize the bot, you load that page as the bot user. You'll get a pin to type back into the command line to complete the auth. - Note the token and secret Twitter generates. It should be in the output from
chatterbot-register
. - If you have trouble at this step, see Chatterbot's instructions here: http://muffinista.github.io/chatterbot/setup.html
- Assumes you've already installed Heroku Toolbelt CLI: https://toolbelt.heroku.com/
heroku create yourbotname
heroku plugins:install git://github.com/ddollar/heroku-config.git
- Rename the .rb and .yml files to your app name if need be
- Examples of what you can do with Chatterbot: http://muffinista.github.io/chatterbot/examples.html
Probably with debug_mode
and/or no_update
on.
- Change the line in
Procfile
to match your bot's.rb
file - In your Heroku dashboard, add config vars for
CONSUMER_KEY
,CONSUMER_SECRET
,TOKEN
,SECRET
, and setENV
=PRODUCTION
(Ignore this for now - not working on ENV vars yet) git push heroku master
- In your Heroku dashboard, turn the worker process on.
heroku logs -t
to see what it's doing