05-04-2012 06:07 PM
Hi, I'm getting the following exception:
java.lang.SecurityException: Could not authenticate with OAuth.
Code:
Credential c = new Credential(CONSUMER_KEY, CONSUMER_SECRET, tTOK);
UserAccountManager uam = UserAccountManager.getInstance(c);
try {
if (uam.verifyCredential()) {
TweetER.getInstance(uam).post(new Tweet(sTweet));
System.out.println( _res.getString(I18N_MSG_TWITTEROK));
//Dialog.inform( _res.getString(I18N_MSG_TWITTEROK));
}
} catch (Exception e) {
System.out.println("Error by posting tweet:" + e);
//Dialog.inform("Error posting Tweet: " + e);
}
and it allways thows the exception on the line: TweetER.getInstance(uam).post(new Tweet(sTweet));
I'm using a sample from Twitter API ME http://kenai.com/projects/twitterapime/pages/Home
I've already created the Twitter Application and got Consumer Key and Secret.
Does someone has a clue of what could be the problem?
Thks!
Solved! Go to Solution.
05-04-2012 06:24 PM
Hello Jppedroso,
can you please try this code.
Pawan
Thanks
05-19-2012 01:08 PM
05-19-2012 08:25 PM