Question

I'm using the linkedin-j library in my Android application. I'm trying to retrieve a request token for OAuth authentication:

LinkedInOAuthService linkedinOAuth = LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(
                  linkedinApiKey,
                  linkedinSecretKey); 
LinkedInRequestToken requestToken = linkedinOAuth.getOAuthRequestToken(MY_CALLBACK_URL);

I get this error:

11-19 22:20:56.985: E/AndroidRuntime(17891): com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: null
11-19 22:20:56.985: E/AndroidRuntime(17891):    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:180)

Anyone know what could be the cause?

Était-ce utile?

La solution

The solution was to place the getOAuthRequestToken into an AsyncTask so that it runs separate from the UI thread.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top