I am trying the following sample app for twitter oauth.
http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html
private void askO
**1) **Set date and time to the right values, this will help to fix this issue.****
2)
private OAuthConsumer consumer;
private OAuthProvider provider;
...
...
...
provider = new CommonsHttpOAuthProvider (
TWITTER_REQUEST_TOKEN_URL,
TWITTER_ACCESS_TOKEN_URL,
TWITTER_AUTHORIZE_URL);
private void askOAuth() {
try {
consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
provider = new CommonsHttpOAuthProvider("http://twitter.com/oauth/request_token",
"http://twitter.com/oauth/access_token",
"http://twitter.com/oauth/authorize");
provider.setOAuth10a(true);
String authUrl = provider.retrieveRequestToken(consumer, CALLBACK_URL);
Toast.makeText(this, "Please authorize this app!", Toast.LENGTH_LONG).show();
this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));
} catch (Exception e) {
Log.e(APP, e.getMessage());
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}
3) is your twitter app configured as Browser? try with this keys:
sdOjEI2cOxzTLHMCCMmuQ
biI3oxIBX2QMzUIVaW1wVAXygbynuS80pqSliSDTc