Created
November 21, 2013 19:02
-
-
Save marcwickenden/7587555 to your computer and use it in GitHub Desktop.
Automatically follow the @Marble_Security top-100-security-experts list members. If that's useful to you! You'll need to supply valid OAuth credentials from dev.twitter.com (read-write). You also need the twitter gem installed: gem install twitter Then just ruby 100sec.rb
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
#!/usr/bin/env ruby | |
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 | |
list = client.list('Marble_Security', 'top-100-security-experts') | |
members = client.list_members(list.id) | |
until members.next_cursor == 0 | |
members.users.each do |user| | |
puts "following #{user.screen_name}" | |
client.follow(user.screen_name) | |
end | |
members = client.list_members(list.id, { :cursor => members.next_cursor }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment