Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Tweetbot makes writing twitter bots twivial!

branch: master
Octocat-spinner-32 example Example expansion September 29, 2011
Octocat-spinner-32 lib Update version December 19, 2011
Octocat-spinner-32 spec Add status capturing events November 01, 2011
Octocat-spinner-32 .gitignore Initial gem configuration September 27, 2011
Octocat-spinner-32 .rspec Move over implementation September 27, 2011
Octocat-spinner-32 .rvmrc Gemset addition September 28, 2011
Octocat-spinner-32 Gemfile Initial gem configuration September 27, 2011
Octocat-spinner-32 README First README September 29, 2011
Octocat-spinner-32 Rakefile Initial gem configuration September 27, 2011
Octocat-spinner-32 tweetbot.gemspec Remove version on tweetstream October 12, 2011
README
So you want to write a twitter bot. Use my gem. Then, you can just do this:

load 'twitter_auth.rb'
require 'tweetbot'

bot = TweetBot.configure do |config|
  config.response_frequency = 100

  config.respond_to_phrase "tweetbot example phrase" do |responses|
    responses << "I am tweetbot!" << "You rang?" << "Pretty cool, thanks for saying hello"
  end

  config.respond_to_phrase "hey @tweetbot" do |responses|
    responses << "Hey back at ya" << "You rang again?"
  end

  config.twitter_auth = TwitterAuth::AuthKeys
end

bot.talk

and build a file called twitter_auth.rb that has your keys

module TwitterAuth
  MyName = 'twitter_name'
  ApigeeEnpoint = nil
  def self.use_apigee?
    !ApigeeEnpoint.nil?
  end
  AuthKeys = {
    consumer_key: "key",
    consumer_secret: "secret",
    oauth_token: "token",
    oauth_token_secret: "token_secret"
  }
end


Abstracting out the apigee stuff, don't worry. Just leave it like that for now.
Something went wrong with that request. Please try again.