This is the code that is causing the problem. And below is the Logcat. I have printed the exception. I have checked the consumer and secret keys multiple times. Could anyone shed anymore light or how to get more details on this issue?
I should also mention that I have run this script on the emulator and a real phone, both bring back the same logcat
09-21 15:27:25.504: ERROR/HelloWorld(17680): 401:Authentication credentials (https://dev.twitter.com/docs/auth) were missing or incorrect. Ensure that you have set valid conumer key/secret, access token/secret, and the system clock in in sync.
09-21 15:27:25.504: ERROR/HelloWorld(17680): Failed to validate oauth signature and token
09-21 15:27:25.504: ERROR/HelloWorld(17680): Relevant discussions can be on the Internet at:
09-21 15:27:25.504: ERROR/HelloWorld(17680): http://www.google.co.jp/search?q=10f5ada3 or
09-21 15:27:25.504: ERROR/HelloWorld(17680): http://www.google.co.jp/search?q=dceba039
09-21 15:27:25.504: ERROR/HelloWorld(17680): TwitterException{exceptionCode=[10f5ada3-dceba039], statusCode=401, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.4}
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:102)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:121)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:276)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.blundell.tut.ttt.TweetToTwitterActivity.loginNewUser(TweetToTwitterActivity.java:109)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.blundell.tut.ttt.TweetToTwitterActivity.buttonLogin(TweetToTwitterActivity.java:83)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invokeNative(Native Method)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invoke(Method.java:521)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View$1.onClick(View.java:2077)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View.performClick(View.java:2461)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.view.View$PerformClick.run(View.java:8890)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Handler.handleCallback(Handler.java:587)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Handler.dispatchMessage(Handler.java:92)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.os.Looper.loop(Looper.java:123)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invokeNative(Native Method)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at java.lang.reflect.Method.invoke(Method.java:521)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
09-21 15:27:25.504: ERROR/HelloWorld(17680): at dalvik.system.NativeStart.main(Native Method)
You have entered wrong Consumer Key or Secret Key from your Created Application in Twitter.
Ensure that you gave the two keys also ensure that it is correct.
For Further Reference Check this Integrating Twitter with Android