Skip to content

Instantly share code, notes, and snippets.

@bvandgrift
Created March 24, 2009 18:54
Show Gist options
  • Save bvandgrift/84293 to your computer and use it in GitHub Desktop.
Save bvandgrift/84293 to your computer and use it in GitHub Desktop.
# http://neovore.com / somethingfamiliar(at)gmail.com
# dirt simple twitter retweeter with twibot
require 'twibot'
#-- in ./config/bot.yml:
#login: your_user_name
#password: your_password
#include_friends: true
#-- EOF
# add people who request it via direct
message do |message, params|
twitter.friend(:add, message.sender.screen_name) if message.text =~ /^followme/
end
# retweet keyworded phrases from friends
tweet do |message, params|
if message.text =~ /#some_phrase_or_keyword/
post_tweet "RT:@#{message.user.screen_name} "+
"#{message.text.gsub(/#some_phrase_or_keyword/, '')}"
end
end
# run with:
#$ nohup ruby retweeter.rb &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment