ユーザ用ツール

サイト用ツール


twitter4r

twitter4r

試してみた

test.rb

#!/usr/bin/ruby -Ku
#
require 'rubygems'
gem 'twitter4r', '>=0.3.0'
require 'twitter'
require 'twitter/console'
require 'time'
require 'yaml'
 
twitter = Twitter::Client.from_config( 'conf.yaml','test')
 
# msg = gets.chomp
# twitter.status(:post, msg)
 
timeline = twitter.timeline_for(:friend, :id => 'nishimotz') do |status|
   puts "#{status.created_at.to_s} #{status.user.screen_name} #{status.text}"
end

conf.yaml

test:
  login: nishimotz
  password: *****
twitter4r.txt · 最終更新: 2013/06/12 19:29 by Takuya Nishimoto

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki