Hi all,
I'm using this one for my project
http://asmx-oauth.googlecode.com/svn/site/1.0/core/consumer/overview.html
The following is my code:
public void testConsumerInteractionWithSP() throws Exception {
ServiceProviderDescriptor descriptor = new
ServiceProviderDescriptor(
new OAuthService(HTTPMethod.GET, new URL(
"https://www.yammer.com/oauth/request_token"),
new String[] { "HMAC-SHA1" },
new ParametersMethod[]
{ ParametersMethod.URI_QUERY }),
new URL("https://www.yammer.com/oauth/authorize"),
new OAuthService(HTTPMethod.GET, new URL(
"https://www.yammer.com/oauth/access_token"),
new String[] { "HMAC-SHA1" },
new ParametersMethod[]
{ ParametersMethod.URI_QUERY }),
new ProtectedResourcesService(HTTPMethod.GET,
new String[] { "HMAC-SHA1" },
new ParametersMethod[]
{ ParametersMethod.URI_QUERY }));
URL serviceURL = new URL(
"https://www.yammer.com/api/v1/messages.xml");
Consumer consumer = new ConsumerImpl(descriptor,
"key", new HmacSha1ConsumerSecret(
"secret"));
RequestToken requestToken = consumer.doRequestToken();
this.logger.info("Obtained requestToken=" + requestToken);
assert requestToken != null;
AccessToken accessToken = consumer.doRequestAccessToken
(requestToken);
this.logger.info("Obtained accessToken=" + accessToken);
assert accessToken != null;
consumer.accessProtectedResource(accessToken, serviceURL,
new NOOPHandler());
}
But what I get is the following exception:
com.asemantics.oauth.core.OAuthException: Impossible to retrieve a
Request Signer for service ((httpMethod=GET,url=https://www.yammer.com/
oauth/request_token),supportedSignatureMethods=[HMAC-
SHA1],supportedParametersMethods=[URI_QUERY])
at com.asemantics.oauth.core.consumer.ConsumerImpl.invoke
(ConsumerImpl.java:329)
at com.asemantics.oauth.core.consumer.ConsumerImpl.doRequestToken
(ConsumerImpl.java:173)
at
com.asemantics.oauth.core.consumer.ConsumerTestCase.testConsumerInteractionWithSP
(ConsumerTestCase.java:92)
at com.asemantics.oauth.core.consumer.ConsumerTestCase.main
(ConsumerTestCase.java:110)
Do you know this issue? Please help me. Thanks very much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OAuth" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---