<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ゆーすけぶろぐ &#187; twitter</title>
	<atom:link href="http://yusukezzz.net/blog/archives/tag/twitter/feed" rel="self" type="application/rss+xml" />
	<link>http://yusukezzz.net/blog</link>
	<description>yusukezzz&#039;s weblog... ぷろぐらむとか ruby, android, java, thinkpad, milestone2</description>
	<lastBuildDate>Sat, 10 Mar 2012 17:22:54 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>bot source</title>
		<link>http://yusukezzz.net/blog/archives/1757</link>
		<comments>http://yusukezzz.net/blog/archives/1757#comments</comments>
		<pubDate>Thu, 15 Apr 2010 10:32:03 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1757</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: ruby; title: ; notranslate">
#!/usr/bin/env ruby
require 'rubygems'
require 'rss'
require 'logger'
require 'twitter'

log = Logger.new('feed.log')
log.level = Logger::DEBUG

def shorten(long_url)
  id = 'YOUR_BITLY_ID'
  api_key = 'BITLY_API_KEY'
  version = '2.0.1'

  query = &quot;version=#{version}&amp;longUrl=#{long_url}&amp;login=#{id}&amp;apiKey=#{api_key}&quot;
  result = JSON.parse(Net::HTTP.get(&quot;api.bit.ly&quot;, &quot;/shorten?#{query}&quot;))
  result['results'].each_pair {|long_url, value|
    return value['shortUrl']
  }
end

feeds = []
feeds &lt;&lt; {
  'author' =&gt; 'yusukezzz',
  'url' =&gt; 'http://yusukezzz.net/blog/feed'}

$KCODE = 'u'
latest = 0
httpauth = Twitter::HTTPAuth.new('twitter_account', 'password')
client = Twitter::Base.new(httpauth)
begin
  File.open('latest.dat'){ |f| latest = f.gets }
rescue =&gt; e
  log.debug(e.message)
end
feeds.each do |feed|
  rss = RSS::Parser.parse(feed['url'])
  rss.channel.items.reverse.each do |i|
    if latest.to_i &lt; i.pubDate.to_i
      post = &quot;#{feed['author']} &gt; #{i.title} #{shorten(i.link)}&quot;
      begin
        client.update(post)
      rescue =&gt; e
        log.debug(e.message)
      end
      File.open('latest.dat', 'w') do |f|
        f.puts i.pubDate.to_i.to_s
        log.debug('update latest date')
      end
    end
  end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1757/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>talklineのtwitter oauthとbitlyへの対応</title>
		<link>http://yusukezzz.net/blog/archives/1686</link>
		<comments>http://yusukezzz.net/blog/archives/1686#comments</comments>
		<pubDate>Thu, 07 Jan 2010 12:05:44 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1686</guid>
		<description><![CDATA[卒論で3年次に作ったtalklineという奴も取り扱うことになったのでちょこっと修正しました twitterにbitlyで短縮したURL付きのpostが出来るように oauthについては参考サイト多数なので省略 良くわか [...]]]></description>
			<content:encoded><![CDATA[<p>卒論で3年次に作ったtalklineという奴も取り扱うことになったのでちょこっと修正しました<br />
twitterにbitlyで短縮したURL付きのpostが出来るように</p>
<p>oauthについては参考サイト多数なので省略<br />
良くわからなかったのはoauthの認証情報でどれを保存すれば良いのか？<br />
保存するのはaccess_tokenとaccess_token_secretでした<br />
この2つを保存しておけば以後consumerキーと組み合わせて即リクエスト出来ます</p>
<p>bitly対応では<br />
<a href="http://blog.bungu-do.jp/archives/1659" target="_blank">Rubyでbit.lyのAPI経由で短縮URLを取得する &#8211; 黒川仁の文具堂ブログ三昧</a><br />
APIを取得してこちらのshortenメソッドをコピペしました</p>
<p>例のごとく反映は遅れるかも</p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1686/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>twitterに位置情報を埋め込む</title>
		<link>http://yusukezzz.net/blog/archives/1643</link>
		<comments>http://yusukezzz.net/blog/archives/1643#comments</comments>
		<pubDate>Thu, 03 Dec 2009 02:51:29 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1643</guid>
		<description><![CDATA[先日、twitterが正式に位置情報に対応しましたが、自分も試してみました rubyのtwitterというgemでやってみました こんな感じでoptionを渡してやるだけです twitter_gemのドキュメントにはop [...]]]></description>
			<content:encoded><![CDATA[<p>先日、twitterが正式に位置情報に対応しましたが、自分も試してみました<br />
rubyのtwitterというgemでやってみました</p>
<pre class="brush: ruby; title: ; notranslate">
# access_token, access_token_secretはあらかじめ準備しているものとします
twitter_oauth = Twitter::OAuth.new(CONSUMER_KEY, SECRET_KEY)
twitter_oauth.authorize_from_access(
access_token, access_token_secret)
@twitter = Twitter::Base.new(twitter_oauth)
@twitter.update('hoge', {:lat =&gt; latitude, :long =&gt; longtitude})
</pre>
<p>こんな感じでoptionを渡してやるだけです<br />
twitter_gemのドキュメントにはoptionがin_reply_to_status_idしか書いてないのですが、ちゃんと投稿してくれます<br />
ちなみに埋め込んだ座標をtweetdeckで表示するとこんな感じ<br />
<div id="attachment_1642" class="wp-caption alignnone" style="width: 194px"><a href="http://yusukezzz.net/blog/wp-content/uploads/2009/12/2bfc96a45921677282a36721a07709ca.png" rel="shadowbox[sbpost-1643];player=img;" title="NY maps overlay on tweetdeck"><img src="http://yusukezzz.net/blog/wp-content/uploads/2009/12/2bfc96a45921677282a36721a07709ca-184x300.png" alt="NY maps overlay on tweetdeck" title="NY maps overlay on tweetdeck" width="184" height="300" class="size-medium wp-image-1642" /></a><p class="wp-caption-text">NY maps overlay on tweetdeck</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1643/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rubyのTwitter::Base.new().verify_credentialsのメソッド？一覧</title>
		<link>http://yusukezzz.net/blog/archives/1625</link>
		<comments>http://yusukezzz.net/blog/archives/1625#comments</comments>
		<pubDate>Wed, 11 Nov 2009 07:48:18 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1625</guid>
		<description><![CDATA[verify_credentialsメソッドは認証したユーザについての情報を返す Mashとかいうhashっぽいので定義されていて、何故かメソッドのごとく&#8221; . &#8220;でアクセス出来る 例）Twitt [...]]]></description>
			<content:encoded><![CDATA[<p>verify_credentialsメソッドは認証したユーザについての情報を返す<br />
Mashとかいうhashっぽいので定義されていて、何故かメソッドのごとく&#8221; . &#8220;でアクセス出来る<br />
例）Twitter::Base.new(oauth).verify_credentials.screen_name</p>
<pre class="brush: ruby; title: ; notranslate">
created_at
description
favorited
favourites_count
followers_count
following
friends_count
geo_enabled
href
id
in_reply_to_screen_name
in_reply_to_status_id
in_reply_to_user_id
location
name
notifications
profile_background_color
profile_background_image_url
profile_background_tile
profile_image_url
profile_link_color
profile_sidebar_border_color
profile_sidebar_fill_color
profile_text_color
protected
rel
screen_name
source
status
statuses_count
text
time_zone
truncated
url
utc_offset
verified
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1625/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>twitterのoauth認証について</title>
		<link>http://yusukezzz.net/blog/archives/1569</link>
		<comments>http://yusukezzz.net/blog/archives/1569#comments</comments>
		<pubDate>Thu, 15 Oct 2009 02:59:45 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1569</guid>
		<description><![CDATA[＃追記 原因は良く分からないけど、なんかいつの間にか出来るようになってた ＃追記終了 サンプルを漁ると大体:oauth_callbackがスクリプト側で上書きされているけど、 最近は仕様が変わったのかそれだとUnauth [...]]]></description>
			<content:encoded><![CDATA[<p>＃追記<br />
原因は良く分からないけど、なんかいつの間にか出来るようになってた<br />
＃追記終了</p>
<p><s>サンプルを漁ると大体:oauth_callbackがスクリプト側で上書きされているけど、<br />
最近は仕様が変わったのかそれだとUnauthorizedが返ってくるみたい<br />
web上で行う設定とスクリプト側の指定を同じにする必要があるらしい<br />
でもweb上の設定だとlocalhostとか指定出来ないし、一度どこかにアップロードしないとテストも出来なくて面倒<br />
developmentモードとか用意して欲しいなー</p>
<p>＃google.comとかも指定出来ない？？？<br />
＃なんか良くわからん…</s></p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1569/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ipod touchでtwitterクライアント選定</title>
		<link>http://yusukezzz.net/blog/archives/1450</link>
		<comments>http://yusukezzz.net/blog/archives/1450#comments</comments>
		<pubDate>Wed, 08 Jul 2009 11:53:39 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/?p=1450</guid>
		<description><![CDATA[ipod touchを研究室から借りたので早速twitterクライアントを探してみました ある程度調べた結果、選択肢は3つに絞られました ・夏ライオン for iPhone ・twitterFon ・tweetdeck  [...]]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption alignnone" style="width: 460px"><a href="http://farm3.static.flickr.com/2459/3701169098_50849f5821.jpg" rel="shadowbox[sbpost-1450];player=img;" title="ipod touch"><img alt="ipod touch" src="http://farm3.static.flickr.com/2459/3701169098_50849f5821.jpg" title="ipod touch" width="450" height="338" /></a><p class="wp-caption-text">ipod touch</p></div><br />
ipod touchを研究室から借りたので早速twitterクライアントを探してみました<br />
ある程度調べた結果、選択肢は3つに絞られました<br />
・夏ライオン for iPhone<br />
・twitterFon<br />
・tweetdeck</p>
<p>この中で、暫定的にtweetdeckに決めました<br />
主な理由として、<br />
・ブラウザ内蔵<br />
・グループごとにカラム分け可能<br />
・作成したグループはサーバに保存され、PC版と同期可能（らしい、まだ試してない）<br />
なところが気に入りました<br />
グループのバックアップ＆同期は地味に嬉しい機能ですね</p>
<p>また、今のところ気になる点は、<br />
・replyの流れを一気に抜粋出来ない（1個ずつ辿ることは可能）<br />
・内蔵ブラウザからタイムラインに戻った時、表示が崩れたことがある（今のところ1度だけ）<br />
・グループ分け登録の際のユーザー名表記がなぜかスクリーンネーム（URLで使われるアカウント名ではない方）<br />
・ちょっともっさり気味？（メモリが心配）<br />
以上です</p>
<p>写真のアップロードとかはtouchにカメラが付いてないのでどうでも良く、<br />
ユーザーを分類できる点とブラウザを内蔵している（tweetdeckを一々落とさなくて良い）点を評価しました<br />
しばらく使ってみてもう少し具合を確かめたいと思います</p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1450/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickrにpostした画像をtweet</title>
		<link>http://yusukezzz.net/blog/archives/1438</link>
		<comments>http://yusukezzz.net/blog/archives/1438#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:56:42 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1438</guid>
		<description><![CDATA[twitterにモバツイでいう写ツみたいな機能が付きました その名もFlickr2Twitter Flickr: Add a weblog こちらから設定でき、送信用のアドレスを貰えます 件名がFlickr上での画像のタ [...]]]></description>
			<content:encoded><![CDATA[<p>twitterにモバツイでいう写ツみたいな機能が付きました<br />
その名もFlickr2Twitter</p>
<p><a href="http://www.flickr.com/account/blogs/add/twitter" target="_blank">Flickr: Add a weblog</a></p>
<p>こちらから設定でき、送信用のアドレスを貰えます<br />
件名がFlickr上での画像のタイトル及びtweetする際のテキストになるようです</p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1438/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>横浜ゲーセン散策＆twitter紹介</title>
		<link>http://yusukezzz.net/blog/archives/1325</link>
		<comments>http://yusukezzz.net/blog/archives/1325#comments</comments>
		<pubDate>Tue, 28 Apr 2009 19:28:43 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.net/blog/archives/1325</guid>
		<description><![CDATA[今日は久々に友達と横浜で遊んでた ゲーセンとしてはネバーランド＆ClubSEGAあたりが良かったかな ネバランのマジアカ２人でやって、最後のクレジットで決勝戦ヽ(*´∀｀)ノ ｷｬｯﾎｰｲ!!とかしてた 他、センター北あ [...]]]></description>
			<content:encoded><![CDATA[<p>今日は久々に友達と横浜で遊んでた<br />
ゲーセンとしてはネバーランド＆ClubSEGAあたりが良かったかな<br />
ネバランのマジアカ２人でやって、最後のクレジットで決勝戦ヽ(*´∀｀)ノ ｷｬｯﾎｰｲ!!とかしてた<br />
他、センター北あたりをぶらぶらして最終的にノースポートのゲーセンに行った<br />
でもプライズモノが非常に子供向けでつまらなかった（ある意味客層を良く表してた）<br />
欲しい物も特に見つからず、ひたすら広い店内に驚いてラーメン食って帰ったｗ</p>
<p>で、その飯のときに、４年になると大学で会う機会が減って友人の動向が分からないという話になって、<br />
自分がやっているtwitterを紹介した<br />
早速その友人も始めてくれて、お互いfollowし合ってる状態<br />
近況や自身の興味対象なんかを垂れ流し合えると面白いと思う</p>
<p>他の友人も巻き込めると面白いと思うんだけど、どうかなー？<br />
とりあえずアカウント作るだけ作って、放置するならそれもまた良し<br />
自分は最初にアカウント作ってから半年ぐらい放置してたしｗ</p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/1325/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rubyでtwitterを操作するライブラリ</title>
		<link>http://yusukezzz.net/blog/archives/602</link>
		<comments>http://yusukezzz.net/blog/archives/602#comments</comments>
		<pubDate>Sun, 14 Dec 2008 17:42:16 +0000</pubDate>
		<dc:creator>yusukezzz</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://yusukezzz.dyndns.org/blog/?p=602</guid>
		<description><![CDATA[そまんまtwitterというのがあります # sudo gem install twitter echoe hoe echoeとhoeは環境によってはいらないかもしれません 参考：Greenbear Laboratory [...]]]></description>
			<content:encoded><![CDATA[<p>そまんまtwitterというのがあります<br />
# sudo gem install twitter echoe hoe<br />
echoeとhoeは環境によってはいらないかもしれません</p>
<pre class="brush: ruby; title: ; notranslate">
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 + &quot;\n&quot;
end
</pre>
<p>参考：<a href="http://mono.kmc.gr.jp/~yhara/w/?RubyTwitterJa" taget="balnk">Greenbear Laboratory &#8211; Ruby Twitter Gem簡易リファレンス</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yusukezzz.net/blog/archives/602/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

