Code Monkey home page Code Monkey logo

heroku-twitter-bot's Introduction

heroku-twitter-bot

Dead-simple wrapper to get Chatterbot running in Heroku in as little as 5 minutes

Your Twitter bot live on Heroku in 5 minutes

Fork this repository

Make a Twitter account for your bot

https://www.twitter.com

Register a Twitter app & bot auth token

  • 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

Make your heroku app

  • 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

Your actual app logic

Test changes locally

Probably with debug_mode and/or no_update on.

Run live on Heroku

  • 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 set ENV = PRODUCTION (Ignore this for now - not working on ENV vars yet)
  • git push heroku master
  • In your Heroku dashboard, turn the worker process on.

That's it!

  • heroku logs -t to see what it's doing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.