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
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0