sibPutnik
|
Posted: November 13, 2011 19:53 by sibPutnik
|
Hi. I can't make authenticat with OAuth on Java2ME. Error report is "Failed to validate oAuth signature and token".
MIDletOAuthDialogWrapper page = new MIDletOAuthDialogWrapper(this);
page.setConsumerKey(CONSUMER_KEY);
page.setConsumerSecret(CONSUMER_SECRET);
page.setCallbackUrl("http://chirica.do.am/");
page.setOAuthListener(new OAuthDialogListener() {...});
page.login();
CONSUMER_KEY and CONSUMER_SECRET a take from my apps page on twitter. Device Nokia 3110c. What is the reason of the problem and how can I fix it? |
Java2Me : Failed to validate oAuth
Replies: 11 - Last Post: December 19, 2011 16:05
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior
showing 1 - 12 of 12
Ernandes Mourao Junior
|
Posted: November 14, 2011 11:29 by Ernandes Mourao Junior
|
| First off, please make sure your device's date, time and timezone are correct. |
Ernandes Mourao Junior
|
Posted: November 14, 2011 16:45 by Ernandes Mourao Junior
|
| It is not a bug. OAuth algoritm requires the correct date/time to work properly. |
sibPutnik
|
Posted: November 14, 2011 15:56 by sibPutnik
|
|
Next step. I have PIN and I want to auth user. But when I invoke MIDletOAuthDialogWrapper.login(PIN) I have exception: "Invalid state: call login() method first". But, when I call MIDletOAuthDialogWrapper.login(), by app is closing and browser opens, so any steps in my App after it can not be made. 1. login(); <app closed> 2. login(PIN) <exception> How can I fix it? |
Ernandes Mourao Junior
|
Posted: November 14, 2011 16:46 by Ernandes Mourao Junior
|
| Unfortunately, if your app is closed, you cannot authenticate, since we need the instace of MIDletOAuthDialogWrapper alive. It keeps some internal state required to complete the process. |
Ernandes Mourao Junior
|
Posted: November 16, 2011 12:05 by Ernandes Mourao Junior
|
| It is not only one token we are talking about. |
Ernandes Mourao Junior
|
Posted: November 16, 2011 12:06 by Ernandes Mourao Junior
|
| Once you are authenticated and you have your access token, it is your app's responsability to store it and further usage. |
Ernandes Mourao Junior
|
Posted: December 19, 2011 16:05 by Ernandes Mourao Junior
|
|
Hi, You are forgetting to mark Twitter API ME lib in Project -> Properties ->Build Path -> Order & Export. If you do not do that, the lib wont be packaged along with your source code. Regards, |
showing 1 - 12 of 12
Replies: 11 - Last Post: December 19, 2011 16:05
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior








