简体   繁体   English

超过Android Twitter API速率限制

[英]Android Twitter api rate limit exceeded

hi i'm in the testing phase for my app and as it all works ok apart from the twitter feed. 嗨,我处于我的应用程序的测试阶段,除了Twitter提要之外,其他所有功能都可以正常工作。 for some reason on my phone it works fine on another phone it doesnt and i'm getting this error message 由于某种原因,我的手机在另一部手机上无法正常工作,并且出现此错误消息

08-14 12:24:18.730: W/System.err(25844): org.json.JSONException: Value {"error":"Rate limit exceeded. Clients may not make more than 150 requests per hour.","request":"\/1\/statuses\/user_timeline.json?screen_name=myleague&count=10"} of type org.json.JSONObject cannot be converted to JSONArray
08-14 12:24:18.730: W/System.err(25844):    at org.json.JSON.typeMismatch(JSON.java:111)
08-14 12:24:18.735: W/System.err(25844):    at org.json.JSONArray.<init>(JSONArray.java:91)
08-14 12:24:18.735: W/System.err(25844):    at org.json.JSONArray.<init>(JSONArray.java:103)
08-14 12:24:18.735: W/System.err(25844):    at .TwitterActivity.loadtweets(TwitterActivity.java:186)
08-14 12:24:18.735: W/System.err(25844):    at .TwitterActivity$PostTask.doInBackground(TwitterActivity.java:154)
08-14 12:24:18.735: W/System.err(25844):    at TwitterActivity$PostTask.doInBackground(TwitterActivity.java:1)
08-14 12:24:18.735: W/System.err(25844):    at android.os.AsyncTask$2.call(AsyncTask.java:264)
08-14 12:24:18.735: W/System.err(25844):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-14 12:24:18.735: W/System.err(25844):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-14 12:24:18.735: W/System.err(25844):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-14 12:24:18.735: W/System.err(25844):    at 

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)

does anyone know why i have tried it on multiple phones before and it's worked. 有谁知道为什么我之前曾在多部手机上尝试过它并且起作用了。 i don't think the rate limit will have been reached but bit confused? 我认为不会达到速率限制,但有点困惑?

This happens because essentially the widgets are API clients , like any other API client , but they are making unauthenticated requests to the API, for which a single IP address has only 150 requests/hour . 之所以会发生这种情况,是因为从本质上讲,小部件是API clients ,就像其他任何API client ,但是它们向API发出未经身份验证的请求,对于这些请求,单个IP address 150 requests/hour只有150 requests/hour

If any other device, Web Browser , or app on your IP address were making Unauthenticated requests to the API at a given block of time, it would be decrementing from the pool. 如果您的IP address上的任何其他设备, Web浏览器应用程序在给定的时间段内向API发出未经身份验证的请求,则该请求将从池中递减

When another user is viewing the widget from a different IP address, they most likely see it display just fine. 当另一个用户从其他IP地址查看窗口小部件时,他们很可能会看到它显示得很好。

You can ask Twitter to move that limit up:: see the process here 您可以要求Twitter提高该限制::在此处查看流程

You can check this useful links: 您可以检查以下有用的链接:

  1. link-1 链接1
  2. link-2 链接2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM