Here is my LogCat
12-05 16:29:59.963: W/System.err(963): 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.
12-05 16:29:59.963: W/System.err(963): error - Read-only application
cannot POST
12-05 16:29:59.973: W/System.err(963): request - /1/statuses/
update.json
12-05 16:29:59.973: W/System.err(963): Relevant discussions can be on
the Internet at:
12-05 16:29:59.973: W/System.err(963):
http://www.google.co.jp/search?q=b2b52c28
or
12-05 16:29:59.973: W/System.err(963):
http://www.google.co.jp/search?q=1c67fec4
12-05 16:29:59.973: W/System.err(963):
TwitterException{exceptionCode=[b2b52c28-1c67fec4], statusCode=401,
retryAfter=-1, rateLimitStatus=null,
featureSpecificRateLimitStatus=null, version=2.2.4}
12-05 16:29:59.973: W/System.err(963): at
twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:
185)
12-05 16:29:59.973: W/System.err(963): at
twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
65)
12-05 16:29:59.973: W/System.err(963): at
twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:
102)
12-05 16:29:59.983: W/System.err(963): at
twitter4j.TwitterImpl.post(TwitterImpl.java:1920)
12-05 16:29:59.983: W/System.err(963): at
twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:454)
And here is my project code
private class CustomAsyncTask extends AsyncTask<String, Void, String>
{
@Override
protected String doInBackground(String... urls) {
String CALLBACK_URI = "http://myapp.com";
String CONSUMER_KEY = "fdsssssssssssssssssssssssss";
String CONSUMER_SECRET = "dfssssssssssssssssss";
String ACCESS_TOKEN = "163882382-fdsfsd";
String ACCESS_TOKEN_SECRET = "fdsdfssssssssfsdsdsfd";
AccessToken ac = new AccessToken(ACCESS_TOKEN,
ACCESS_TOKEN_SECRET);
Log.d("robin", "caught");
// Configuration configuration =
configurationBuilder.build();
// Twitter twitter = new
// TwitterFactory(configuration).getInstance(ac);
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
twitter.setOAuthAccessToken(ac);
Log.d("sayfsdem", "caught");
try {
twitter4j.Status status = twitter
.updateStatus("tihs sw th aa
updatein");
Log.d("status", status.toString());
} catch (TwitterException e) {
// TODO Auto-generated catch block
Log.d("final", "caught");
e.printStackTrace();
}
try {
Log.d("userName", twitter.getScreenName());
// Log.d("password",twitter.getFavorites()());
} catch (IllegalStateException e) {
Log.d("illesayem", "caught");
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TwitterException e) {
Log.d("fdfds", "caught");
// TODO Auto-generated catch block
e.printStackTrace();
}
twitter.getAuthorization();
return "dfs";
}
@Override
protected void onPostExecute(String result) {
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en