Skip to content

Instantly share code, notes, and snippets.

@kkosuge
Created June 22, 2011 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkosuge/1040314 to your computer and use it in GitHub Desktop.
Save kkosuge/1040314 to your computer and use it in GitHub Desktop.
フォローしてないフォロワー全部ブロックするやつ
require "rubygems"
require "twitter"
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
client = Twitter::Client.new
bye = (client.follower_ids.ids - client.friend_ids.ids)
bye.each_with_index do |follower,index|
client.block(follower) rescue
client.unblock(follower) rescue
puts index if index % 100 == 0
sleep 0.5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment