Twitter botが作りたい。

 コミッターのサイトに載っていたので、広まるようにメモ

 Twitterj4を使っていて、ダイレクトメッセージを流すところでこんなエラー

Exception in thread "Twitter Stream consumer-1[Receiving stream]" java.lang.NumberFormatException: For input string: "2156851464"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:459)
	at java.lang.Integer.valueOf(Integer.java:553)
	at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
	at twitter4j.DirectMessageJSONImpl.init(DirectMessageJSONImpl.java:63)
	at twitter4j.DirectMessageJSONImpl.<init>(DirectMessageJSONImpl.java:60)
	at twitter4j.AbstractStreamImplementation.asDirectMessage(AbstractStreamImplementation.java:194)
	at twitter4j.UserStreamImpl.onDirectMessage(UserStreamImpl.java:88)
	at twitter4j.AbstractStreamImplementation.handleNextElement(AbstractStreamImplementation.java:89)
	at twitter4j.UserStreamImpl.next(UserStreamImpl.java:63)
	at twitter4j.TwitterStream$TwitterStreamConsumer.run(TwitterStream.java:621)

 後で探していたら下記のページで見つけました。知らないにも程がありますが、このページが作者のページだったんですね。今度チェックしてみます。あと、メーリングに入りましょう!

特に事前に騒がれてはいなかったのですが今日TwitterのダイレクトメッセージのIDが
符号付き32bitの最大値(=2147483647、約21億)を超えました。もう一つのTwitpocalypseですね。

http://samuraism.jp/diary/2011/01/06/1294312500000.html

 僕の使っていたTwitter4jは2.1.8、氏によると対応した最新版である2.1.10を使うといいそうです。しかし、21億って・・・ダイレクトメッセージなんてあんまり使わないと思っていたけど、凄いですね。2010年9月時点で世界でTwitterのユーザー数1億4000万以を超えているってのを見れば、一人20回ぐらいダイレクトメッセージでつぶやけば簡単に21億いっちゃいますね。(アクティブユーザーはもっと少ないんだろうけど)

ツイッターは140文字制限を特徴とするマイクロブログサービスだが、
このサービスを利用する1億4500万人(もしくは少なくとも1億4500万個のアカウント)の
ユーザーは、このサービスだけでは満足することが出来ず、・・・

http://jp.blogherald.com/2010/09/06/twitter-reaches-125-million-users-300-thousand-apps/

メーリング http://twitter4j.org/ja/index.html#mailingList