【问题标题】:Unable to get request token from linked-j on Android无法从 Android 上的linked-j 获取请求令牌
【发布时间】:2013-11-20 06:26:17
【问题描述】:

我在我的 Android 应用程序中使用了linkedin-j 库。我正在尝试检索 OAuth 身份验证的请求令牌:

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

我收到此错误:

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)

有人知道是什么原因吗?

【问题讨论】:

    标签: android linkedin-j


    【解决方案1】:

    解决方案是将 getOAuthRequestToken 放入 AsyncTask 中,使其与 UI 线程分开运行。

    【讨论】:

      猜你喜欢
      • 2017-10-11
      • 1970-01-01
      • 1970-01-01
      • 2016-06-22
      • 1970-01-01
      • 2017-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多