Skip to content

Instantly share code, notes, and snippets.

@Yuiki
Last active March 25, 2016 08:26
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 Yuiki/68c9f0250c8aa399b8e2 to your computer and use it in GitHub Desktop.
Save Yuiki/68c9f0250c8aa399b8e2 to your computer and use it in GitHub Desktop.
Killed by rate limit.
require "twitter"
client = Twitter::REST::Client.new do |config|
config.consumer_key = "hoge"
config.consumer_secret = "fuga"
config.access_token = "piyo"
config.access_token_secret = "moge"
end
File.open("website.txt", "w") do |file|
client.friend_ids.each do |id|
user = client.user(id)
website = user.website || "none"
file.puts "#{user.name}(@#{user.screen_name}):#{website}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment