문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top