twitter4j - android twitter retrieveRequestToken 401 on request token -


i trying following sample app twitter oauth.

http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html

private void askoauth() {         try {             consumer = new commonshttpoauthconsumer(consumer_key, consumer_secret);             provider = new defaultoauthprovider("http://twitter.com/oauth/request_token",                                                 "http://twitter.com/oauth/access_token",                                                 "http://twitter.com/oauth/authorize");             string authurl = provider.retrieverequesttoken(consumer, callback_url);             toast.maketext(this, "please authorize 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();         }     } 

when run following code gives exception following

"oauth.signpost.exception.oauthnotauthorizedexception: authorization failed (server replied 401). can happen if consumer key not correct or signatures did not match."

on line string authurl = provider.retrieverequesttoken(consumer, callback_url);

i provided correct 'key' , 'secret' twitter giving me wrong key , secret ?

i have spent several hours on this. seems have set value callback url in settings tab in twitter application developer panel. keeping default empty value disables dynamic callback urls.

all tutorials , information have found online void. twitter long removed "client / website" radio button.

moreover, oauth checks clock skews.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -