Groups
Groups
Sign in
Groups
Groups
Twitter4J J
Conversations
About
Send feedback
Help
[Twitter4J] GAE/J + twitter4j-2.1.2でのsearch API制限
133 views
Skip to first unread message
ozamasa
unread,
May 7, 2010, 2:39:38 AM
5/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Twitter4J J
お世話になります。
GAE/J + twitter4j-2.1.2 でTwitter検索するサーブレットを試しているのですが、
Twitter検索(search)すると、高い確率でrate limit(420のエラー)に引っ掛かってしまいます。
・プログラムはtwitter4jのHPのコード例「Tweetの検索」を参考にさせて頂きました。ほぼ一緒です。
・1時間に1回、searchを投げるだけでも制限に引っ掛かります。
・認証は必要ないと思うのですが、認証なし、oAuth認証、Basic認証、いずれも制限に引っ掛かりました。
・同じリクエスト内でsearchの後、「getFollowersIDs」を投げても、こっちはエラーになりません。
・rate limitの制限が出た時にgetRateLimitStatusでステータスを見ると
「HourlyLimit=20000、RemainingHits=19987」
のようになっています。
⇒ホワイトリスト申請は拒否されました。が、20000になってるみたいです。
RemainingHitsのカウントの仕方はよく分からないです。(誰かと共有?)
・以前、twitter4j-2.0.xを使っていた時は引っ掛からなかったと思うのですが。。。
この原因と回避する手段をご存じないでしょうか?
--
Twitter4J の最新情報をフォロー:
http://twitter.com/t4j_news
現在開発中のバージョン: 2.1.3
http://twitter4j.org/jira/secure/IssueNavigator.jspa?requestId=10030
バグトラッキング:
http://twitter4j.org/jira/browse/TFJ
このメールは次の Google グループの参加者に送られています: Twitter4J J
このグループにメールで投稿:
twitt...@googlegroups.com
このグループから退会する:
twitter4j-j...@googlegroups.com
その他のオプションについては、次の URL からグループにアクセスしてくださ
い。
http://groups.google.com/group/twitter4j-j?hl=ja
Yusuke Yamamoto
unread,
May 7, 2010, 2:46:27 AM
5/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to twitt...@googlegroups.com
こんにちは
Search API はIPアドレス毎の制限になります。
http://apiwiki.twitter.com/Rate-limiting
IPアドレスが共有されるようなクラウド環境ですとほかのアプリケーションと
制限回数を奪い合うようなことになってしまいます。
Amazon EC2 のように自分のインスタンス専用のIPアドレスが割り振られる
クラウド環境を使うか、自宅サーバを立てるなどするのがいいと思います。
--
Yusuke Yamamoto
yus...@mac.com
このメールは: [x] ブログ/Twitterへ転載可能 [ ] 私信
Twitter でフォロー :
http://twitter.com/yusukey
blogを購読:
http://samuraism.jp/
ozamasa
unread,
May 7, 2010, 3:02:19 AM
5/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Twitter4J J
返信ありがとうございます。
> Search API はIPアドレス毎の制限になります。
そうなんですね。
「アカウントとIPアドレス」というところに若干期待していたのですが...
(ここで謳っているアカウントってアプリ=Consumer keyだと思ってたんですが、
ニュアンス違うみたいですね...あ、認証不要ですもんね...)
> Amazon EC2 のように自分のインスタンス専用のIPアドレスが割り振られる
> クラウド環境を使うか、自宅サーバを立てるなどするのがいいと思います。
検討したいとおもいます。
ありがとうございました。
Reply all
Reply to author
Forward
0 new messages