Created
March 24, 2009 18:54
-
-
Save bvandgrift/84293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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