Skip to content

Instantly share code, notes, and snippets.

@iseebi
Last active August 29, 2015 13:59
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 iseebi/10533205 to your computer and use it in GitHub Desktop.
Save iseebi/10533205 to your computer and use it in GitHub Desktop.
Twitterリスト一括登録
# -*- coding: utf-8 -*-
require "twitter"
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
end
# @iseebi/ebi
account_name = "iseebi"
list_name = "ebi"
# add users to this array
users = [
"iseebi"
]
users.each do |user_to_add|
client.add_list_member(account_name, list_name, user_to_add)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment