Created
December 23, 2013 12:48
-
-
Save Yamabiko/8096585 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("つぶやく内容") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment