Created
December 23, 2013 12:54
-
-
Save Yamabiko/8096671 to your computer and use it in GitHub Desktop.
プロフィールをいじるプログラム
This file contains hidden or 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
require 'twitter' | |
TW_CONSUMER_KEY = " your consumer key " | |
TW_CONSUMER_SECRET = " your consumer secret " | |
TW_ACCESS_TOKEN = " your access token " | |
TW_ACCESS_TOKEN_SECRET = " your access token secret " | |
# ログイン | |
# ログイン不要な操作もありますがこれやっとけば大抵問題ない(適当 | |
twClient = Twitter::REST::Client.new do |config| | |
config.consumer_key = TW_CONSUMER_KEY | |
config.consumer_secret = TW_CONSUMER_SECRET | |
config.access_token = TW_ACCESS_TOKEN | |
config.access_token_secret = TW_ACCESS_TOKEN_SECRET | |
end | |
twClient.update_profile({:name => "new_name", :url => "url", :location => "location", :description => "description"}) | |
# 引数のハッシュには、更新したい要素だけ記述すればOK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment