Hello,
I am new to twitter API, and i had explored it a lot for four five days. I am having a problem as people above are discussing that , i am not able to get the user Info. For that, API is saying to use the following code :
<code>User user = twitter.showUser(userID); (1)
//userID --> Data Type 'long' </code>
I had corrected the timezone and date, but still i am not able to get the user [at line (1) above] object in my code. showUser() method makes request to twitter server so it must be in a background or separate thread i did the same i had put the method call in the doInBackground() method of AsyncTask class. Still i failed.
Whenever i call showUser() method as above it gives the following exception :
04-28 23:02:22.880: W/System.err(8358): Received authentication challenge is nullRelevant discussions can be on the Internet at:
04-28 23:02:22.880: W/System.err(8358): http://www.google.co.jp/search?q=bb0a5eb5 or
04-28 23:02:22.880: W/System.err(8358): http://www.google.co.jp/search?q=1ef844ea
04-28 23:02:22.880: W/System.err(8358): TwitterException{exceptionCode=[bb0a5eb5-1ef844ea 5147af80-c010541d], statusCode=-1, retryAfter=0, rateLimitStatus=null, version=2.2.2}
04-28 23:02:22.880: W/System.err(8358): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:204)
04-28 23:02:22.880: W/System.err(8358): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
04-28 23:02:22.880: W/System.err(8358): at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
04-28 23:02:22.880: W/System.err(8358): at twitter4j.TwitterImpl.get(TwitterImpl.java:1721)
04-28 23:02:22.880: W/System.err(8358): at twitter4j.TwitterImpl.showUser(TwitterImpl.java:507)
04-28 23:02:22.880: W/System.err(8358): at com.vivek.twitterconnect.MainActivity$Async.doInBackground(MainActivity.java:296)
04-28 23:02:22.880: W/System.err(8358): at com.vivek.twitterconnect.MainActivity$Async.doInBackground(MainActivity.java:1)
04-28 23:02:22.880: W/System.err(8358): at android.os.AsyncTask$2.call(AsyncTask.java:252)
04-28 23:02:22.880: W/System.err(8358): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-28 23:02:22.880: W/System.err(8358): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-28 23:02:22.880: W/System.err(8358): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
04-28 23:02:22.885: W/System.err(8358): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
04-28 23:02:22.885: W/System.err(8358): at java.lang.Thread.run(Thread.java:1020)
04-28 23:02:22.885: W/System.err(8358): Caused by: java.io.IOException: Received authentication challenge is null
04-28 23:02:22.885: W/System.err(8358): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.java:1176)
04-28 23:02:22.890: W/System.err(8358): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.processResponseHeaders(HttpURLConnectionImpl.java:1118)
04-28 23:02:22.890: W/System.err(8358): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1044)
04-28 23:02:22.890: W/System.err(8358): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:736)
04-28 23:02:22.895: W/System.err(8358): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:146)
04-28 23:02:22.895: W/System.err(8358): at twitter4j.internal.http.HttpResponseImpl.(HttpResponseImpl.java:35)
04-28 23:02:22.895: W/System.err(8358): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:168)
04-28 23:02:22.895: W/System.err(8358): … 12 more
So please help me guys and geeks. prompt response from any person how is sound in this API will be solicited.
Regards
Vivek