403:The request is understood, but it has been refused Twitter Android

User42590 picture User42590 · Oct 4, 2013 · Viewed 12k times · Source

I am trying to tweet on twitter from android. Now for this i have create an application on dev.twitter and downloaded sample code from this link and update both keys with my app keys.

Now i run the code authenticate the account and after it i tweet and this tweet includes image and text both image was on URL as define in sample code. Now i first time it shows me image and text successfully uploaded but when i try to again tweet it gives me 403 status update error.

For this i change the text message "status Text" and image URL but still it is giving me "403 status" update error. I have the same code as written in sample code only keys are changed.

Here is my Logcat:

10-04 11:26:25.015: W/System.err(22822): 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
10-04 11:26:25.015: W/System.err(22822): message - Error creating status.
10-04 11:26:25.015: W/System.err(22822): code - 189
10-04 11:26:25.025: W/System.err(22822): Relevant discussions can be found on the Internet at:
10-04 11:26:25.025: W/System.err(22822):    http://www.google.co.jp/search?q=b2b52c28 or
10-04 11:26:25.025: W/System.err(22822):    http://www.google.co.jp/search?q=11331d43
10-04 11:26:25.025: W/System.err(22822): TwitterException{exceptionCode=[b2b52c28-11331d43], statusCode=403, message=Error creating status., code=189, retryAfter=-1, rateLimitStatus=null, version=3.0.3}
10-04 11:26:25.025: W/System.err(22822):    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)
10-04 11:26:25.025: W/System.err(22822):    at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
10-04 11:26:25.025: W/System.err(22822):    at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
10-04 11:26:25.030: W/System.err(22822):    at twitter4j.TwitterImpl.post(TwitterImpl.java:1871)
10-04 11:26:25.030: W/System.err(22822):    at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:252)
10-04 11:26:25.030: W/System.err(22822):    at chintan.khetiya.android.Twitter_code.Twitt_Sharing.Share_Pic_Text_Titter(Twitt_Sharing.java:126)
10-04 11:26:25.030: W/System.err(22822):    at chintan.khetiya.android.Twitter_code.Twitt_Sharing$PostTwittTask.doInBackground(Twitt_Sharing.java:91)
10-04 11:26:25.030: W/System.err(22822):    at chintan.khetiya.android.Twitter_code.Twitt_Sharing$PostTwittTask.doInBackground(Twitt_Sharing.java:1)
10-04 11:26:25.030: W/System.err(22822):    at android.os.AsyncTask$2.call(AsyncTask.java:287)
10-04 11:26:25.035: W/System.err(22822):    at java.util.concurrent.FutureTask.run(FutureTask.java:234)
10-04 11:26:25.035: W/System.err(22822):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
10-04 11:26:25.040: W/System.err(22822):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-04 11:26:25.040: W/System.err(22822):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-04 11:26:25.040: W/System.err(22822):    at java.lang.Thread.run(Thread.java:856)

Answer

zingle-dingle picture zingle-dingle · Jan 17, 2014

I had this same error and upgrading to the latest version of twitter4j 3.0.5 (at the time of this writing) fixed the issue.

Get the latest here http://twitter4j.org/en/index.html#download

EDIT: I should mention that the version i was running was twitter4j 3.0.3. So by going to version 3.0.5 or 3.0.6 fixed the issue for me.