Skip to content

Instantly share code, notes, and snippets.

@champierre
Created December 9, 2014 13:53
Show Gist options
  • Save champierre/bd8b8471b139d872b3dd to your computer and use it in GitHub Desktop.
Save champierre/bd8b8471b139d872b3dd to your computer and use it in GitHub Desktop.
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