[oauth] Re: How to obtain access_token using OAuthClient.getAccessToken?

2009-11-24 Thread stager0909
parameter_absent problem was resolved.
However, the occurrence of the problem is signature_invalid.

Error message : Authentication error: Unable to respond to any of
these challenges: {oauth=WWW-Authenticate: OAuth
oauth_problem=signature_invalid}

java code :

public String obtainAccessToken() throws Exception {
try {
oAuthAccessor.setProperty("oauth_verifier", 
params.getString
("oauth_verifier"));
OAuthMessage oAuthMessage = oAuthClient.getAccessToken
(oAuthAccessor, null, OAuth.newList(OAuth.OAUTH_VERIFIER,
params.getString("oauth_verifier"), OAuth.OAUTH_TOKEN, params.getString
("oauth_token")));
return oAuthMessage.getParameter("xoauth_yahoo_guid");
} catch (OAuthProblemException problem) {
log.error("obtainAccessToken OAuthProblemException 
error");
problem.printStackTrace();
log.error(problem);

log.error(problem.getParameters().get(HttpMessage.RESPONSE));
throw new 
Exception("export.externemail.cannot.download");
} catch (Exception e) {
log.error("obtainAccessToken Exception error");
e.printStackTrace();
log.error(e);
throw new 
Exception("export.externemail.cannot.download");
}
}

Please help me.

--

You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to oa...@googlegroups.com.
To unsubscribe from this group, send email to 
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.




[oauth] Re: How to obtain access_token using OAuthClient.getAccessToken?

2009-09-09 Thread John Kristian

The oauth_verifier should be sent to the service provider when
requesting an access token, like this:

client.getAccessToken(oAuthAccessor, null,
 OAuth.newList("oauth_verifier", params.getString("oauth_verifier"));

On Sep 7, 1:52 am, stager0909  wrote:
> I want to get yahoo contact. So I obtain request_token and user login.
> But I fail to get access token
> ...
> public void obtainAccessToken() throws IOException,
> net.oauth.OAuthException, URISyntaxException {
>   try {
>     oAuthAccessor.setProperty("oauth_verifier", 
> params.getString("oauth_verifier"));
>     client.getAccessToken(oAuthAccessor, null, null);

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to oauth@googlegroups.com
To unsubscribe from this group, send email to oauth+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~--~~~~--~~--~--~---