rubyでtwitterを操作するライブラリ

そまんまtwitterというのがあります
# sudo gem install twitter echoe hoe
echoeとhoeは環境によってはいらないかもしれません

[ruby]
require ‘rubygems’
require ‘twitter’

# login情報
id = ‘twitter_id’
pass = ‘twitter_pass’

# loginする
twit = Twitter::Base.new(id, pass)

# 自アカウントのタイムライン取得
twit.timeline(:friends).each do |s|
puts s.user.name.toutf8 + ‘:’ + s.text.toutf8 + “\n”
end
[/ruby]

参考:Greenbear Laboratory – Ruby Twitter Gem簡易リファレンス

カテゴリー: All   タグ: ,   この投稿のパーマリンク

コメントをどうぞ

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>