Latest commit 87cbe33
Aug 1, 2012
|Failed to load latest commit information.|
The Twitter2Twilio ruby script is a modification of an earlier project I made called Tweeter Keeper (https://github.com/jefflinwood/Tweeter-Keeper) that was built on a lot of other people's work - I didn't see any reason to reinvent the wheel. Here's a listing of the gems used in Twitter2Twilio: TweetStream gem (https://github.com/intridea/tweetstream/) - reads tweets off of Twitter's streaming API (https://dev.twitter.com/docs/streaming-api/concepts) and provides a Ruby block with the tweets. Twilio gem (https://github.com/twilio/twilio-ruby/) - needed for interfacing with Twilio to authenticate your account with your SID and auth token, and to send SMS's with an easy one-liner. Redis gem (http://rubygems.org/gems/redis/) - key/value store used for inter-process communication with TwilioSignup (https://github.com/jefflinwood/twiliosignup) - a very simple tool that adds up incoming SMS requests to a Redis set. Yajl-ruby gem (https://github.com/brianmario/yajl-ruby/) - Used for basic configuration tasks # Install ============= Environment - requires Ruby and Redis. gem install bundle bundle install # Configuration ============== You will need a Twilio account and a Twitter account for this to work, but the Twitter account does not need to be the same one you follow - Twitter just needs a username and password for access to the Twitter Streaming API. Each Twitter account can only be used for one connection, so you'll probably need one for dev and one for production. You'll also need a Redis URL (for instance, from Redis2Go on Heroku). I configured TwilioSignup with a free Redis2Go addon, and then copied and pasted the Redis2Go URL here. All of the configuration you need to do is in config.yaml: username: The twitter username password: The twitter password (in clear text, unfortunately) account_sid: Twilio account sid auth_token: Twilio auth token redis_url: Redis URL that TwilioSignup also knows about username_to_follow: Twitter username to follow (the one for the conference, for instance) # Usage ============== bundle exec ruby tweeter-keeper.rb # Future Plans ================ Let me know if you're using this for anything interesting - firstname.lastname@example.org - I coded it for the Austin on Rails BohConf Unconference, so it's a little rough around the edges, but happy to see it get more life.