Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
locales
spec
templates
.gitignore
.rspec
.travis.yml
Gemfile
Guardfile
LICENSE
README.md
Rakefile
lita-tweet.gemspec

README.md

lita-tweet

Build Status Coverage Status

Allows the Lita chat bot to tweet on command.

Installation

Add lita-tweet to your Lita instance's Gemfile:

gem "lita-tweet"

Configuration

To make this plugin work, you'll need to set at least TWITTER\_CONSUMER\_KEY and TWITTER\_CONSUMER\_SECRET. If you want to host the bot at a specific URL, rather than the default 0.0.0.0:1234 type address, you'll also need to set SERVER\_URL so that the bot knows where to send users and Twitter auth callbacks.

require "lita-tweet" if ENV.has_key?("TWITTER_CONSUMER_KEY")

Lita.configure do |config|
  if ENV.has_key?("TWITTER_CONSUMER_KEY")
    config.handlers.tweet.http_url = ENV["SERVER_URL"]
    config.handlers.tweet.consumer_key = ENV.fetch("TWITTER_CONSUMER_KEY")
    config.handlers.tweet.consumer_secret = ENV.fetch("TWITTER_CONSUMER_SECRET")
  end
end

Usage

To authorize an account for tweeting, use the command twitter accounts add and follow the instructions. To tweet, use the command tweet some text that should go in the tweet. To delete the last tweet, use the command untweet. For a complete list of commands, including how to map specific twitter accounts to specific chat channels, see the output from the command help.

You can’t perform that action at this time.