0

I'm using the AndroidTwitter project at https://github.com/lorensiuswlt/AndroidTwitter to connect to Twitter and send a tweet. I can authorize with Twitter successfully, and it says I'm logged in, however when I go to post a tweet, I get this error. The system time is correct on the Android device, and my oauth key and secret are filled out (No problems when logging in).

08-01 14:25:07.222: W/System.err(5527): 401:Authentication credentials (https://dev.twitter.com/docs/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
08-01 14:25:07.222: W/System.err(5527): error - Could not authenticate with OAuth.
08-01 14:25:07.222: W/System.err(5527): request - /1/statuses/update.json
08-01 14:25:07.222: W/System.err(5527): Relevant discussions can be found on the Internet at:
08-01 14:25:07.222: W/System.err(5527):     http://www.google.co.jp/search?q=b2b52c28 or
08-01 14:25:07.222: W/System.err(5527):     http://www.google.co.jp/search?q=1a591522
08-01 14:25:07.222: W/System.err(5527): TwitterException{exceptionCode=[b2b52c28-1a591522],     statusCode=401, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=3.0.0-SNAPSHOT(build: a5aafcad15add0fbc7a6583e337a1abbafa23435)}
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:176)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
08-01 14:25:07.229: W/System.err(5527):     at twitter4j.TwitterImpl.post(TwitterImpl.java:1970)
08-01 14:25:07.237: W/System.err(5527):     at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:415)
08-01 14:25:07.237: W/System.err(5527):     at net.londatiga.android.TwitterApp.updateStatus(TwitterApp.java:106)
08-01 14:25:07.237: W/System.err(5527):     at net.londatiga.android.TestPost$5.run(TestPost.java:106)
Andy
  • 1,815
  • 2
  • 22
  • 49

1 Answers1

0

If you've just set it up, your twitter app is probably still set to read-only. Check your app's application type in the twitter settings console. Make sure you re-generate your access tokens after changes.

Krylez
  • 17,414
  • 4
  • 32
  • 41
  • That's true, I had it set to read only. I tried regenerating the access tokens at Twitter and they are the same as they were before. I also tried resetting my consumer key and secret and running it again with the new keys but I get the same error. – Andy Aug 01 '12 at 19:43
  • When you change your app type, it can take Twitter a little while to update. Try revisiting the settings page. If it no longer says read-only, then try re-generating your access tokens – Krylez Aug 01 '12 at 20:58