Pregunta

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?

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top