Created
December 9, 2014 13:53
-
-
Save champierre/bd8b8471b139d872b3dd to your computer and use it in GitHub Desktop.
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
require 'twitter' | |
# ログイン | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = 'Application Consumer Key (API Key)' | |
config.consumer_secret = 'Application Consumer Secret (API Secret)' | |
config.access_token = 'Your Access Token' | |
config.access_token_secret = 'Your Access Token Secret' | |
end | |
# 同じ文面でツイートすると2回目以降はじかれてしまうので時刻をつけています | |
client.update("こんにちは! #{Time.now}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment