0

I'm trying to do check'ins to GetGlue using GetGlue API. I have this code from SeriesGuide GitHub.

I'm new with Oauth and I don't know why it doesn't work because

 uri.getQueryParameter(OAuth.OAUTH_VERIFIER); 

returns always null and

mProvider.retrieveAccessToken(mConsumer, oauth_verifier);

gives and exception.

This is the console log:

05-01 17:51:58.098: E/PrepareRequestTokenActivity(4790): OAuth - Access Token Retrieval Error
05-01 17:51:58.098: E/PrepareRequestTokenActivity(4790): oauth.signpost.exception.OAuthExpectationFailedException: Request token or token secret not set in server reply. The service provider you use is probably buggy.
05-01 17:51:58.098: E/PrepareRequestTokenActivity(4790):    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:206)
05-01 17:51:58.098: E/PrepareRequestTokenActivity(4790):    at oauth.signpost.AbstractOAuthProvider.retrieveAccessToken(AbstractOAuthProvider.java:108)

What am I doing wrong?

Thank you for your time!

Daniel Argüelles
  • 2,229
  • 1
  • 33
  • 56

1 Answers1

1

Check out the new getglue-java library which will replace the code you are currently using in SeriesGuide. It uses the new v3 API end points and easier to handle OAuth 2.0 for authentication.

Check out the README for up-to date instructions.

Uwe
  • 101
  • 4
  • I can't use your library. I get java.lang.VerifyError: org/apache/oltu/oauth2/client/response/OAuthJSONAccessTokenResponse and I am using this jars: YoutubeAndroidPlayerApi, universal-image-loader, gson2.2.4, okhttp1.2.1, apache.oauth2.client0.31, apache.oauth2.common0.31, retrofit1.2.2, libgoogleanalyticsv2 and android-suport-v7. Any suggestion? – Daniel Argüelles Dec 15 '13 at 16:35
  • You need to use the new Apache Oltu OAuth library! E.g. org.apache.oltu.oauth2.client v0.31. See http://oltu.apache.org/download.html. – Uwe Dec 19 '13 at 09:54
  • Yes, those are what I am using but maybe there is a conflict with another library :( – Daniel Argüelles Dec 20 '13 at 17:31
  • You might want to look at [this comment on VerifyError](http://stackoverflow.com/a/2518002/1000543). It sounds silly, but make sure that you actually export the Oltu OAuth library jars. – Uwe Dec 21 '13 at 10:27
  • 1
    I was searching in the maven repository, and I found the problem. This library is also needed: http://mvnrepository.com/artifact/org.codehaus.jettison/jettison/1.3.4 – Daniel Argüelles Dec 27 '13 at 20:59