Created
March 12, 2013 22:46
-
-
Save srockstyle/5147801 to your computer and use it in GitHub Desktop.
TwitterのGemを使ってTwitterにRubyから投稿する方法。
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
# -*- coding: utf-8 -*- | |
require "twitter" | |
## Twitterのもろもろの情報。 | |
Twitter.configure do |cnf| | |
cnf.consumer_key = "Consumer key" | |
cnf.consumer_secret = "Consumer secret" | |
cnf.oauth_token = "OAuth token" | |
cnf.oauth_token_secret = "OAuth token secret" | |
end | |
## Hellow Worldと投稿される。 | |
Twitter.update("Hello World!!!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment