【问题标题】:My phone (htc g8 wildfire os2.1) not support LinkedIn我的手机 (htc g8 wildfire os2.1) 不支持 LinkedIn
【发布时间】:2019-12-22 03:36:25
【问题描述】:
11-17 15:04:15.477: ERROR/AndroidRuntime(3411): ***Uncaught handler: thread main exiting due to uncaught exception***
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): ***com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException:*** ***oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed:*** htts:///api.linkedin.com/uas/oauth/requestToken
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:146)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at com.ceosoft.alumlife.util.LinkedInAuthenticateHelper.getRequestToken(LinkedInAuthenticateHelper.java:66)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at com.ceosoft.alumlife.util.LinkedInAuthenticateHelper.authenticateApp(LinkedInAuthenticateHelper.java:53)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at 
.....
....
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): ***Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: htts:///api.linkedin.com/uas/oauth/requestToken***
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:138)
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): ... 25 more
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): ***Caused by: java.io.FileNotFoundException: https:/.//api.linkedin.com/uas/oauth/requestToken***
11-17 15:04:15.507: ERROR/AndroidRuntime(3411): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.
....
....

我的代码如下:

private LinkedInRequestToken getRequestToken() {

   Log.d(TAG, "API_KEY = " + OAUTH_CONSUMER_KEY);
   Log.d(TAG, "SECRET_KEY = " + OAUTH_CONSUMER_SECRET );

   mOauthService = LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);
   Log.d(TAG, "mOauthService = LinkedInOAuthServiceFactory.getInstance()");
   requestToken = mOauthService.getOAuthRequestToken(CALLBACK_URL); //this line occur error
   Log.d(TAG, "LinkedInRequestToken requestToken = mOauthService");
   return requestToken;

}

我没有权力在此处放置多个超链接。 所以我很抱歉!

注意:“htts”表示https
“///”是“//”

【问题讨论】:

  • htts:///api.linkedin.com/uas/oauth/requestToken。不应该是 http:// 还是 https://
  • 我为你感到非常抱歉。我以访客身份在本网站提问。

标签: android linkedin


【解决方案1】:

@塞缪尔。不确定我是否理解您的意思注意:“htts”表示 https,但我只是查看了linkedin API,上面写着https://api.linkedin.com/uas/oauth/requestToken

【讨论】:

    【解决方案2】:

    我的时间提前了 8 分钟,并解决了它,让它回到了实时

    阿肖克的回答 Android LinkedIn Integration Error on Device And Emulator

    “如果有任何错误,时间、日期和时区应该是正确的,甚至 1 分钟的差异都会给出这个异常”。

    【讨论】:

      【解决方案3】:

      答案是:

      我手机的时间设置有问题。不是我的申请。如果您想使用 LinkedIn,则需要正确的时间设置。

      【讨论】:

      • 我已经改变了我的设备时间我仍然面临同样的错误......FileNotFoundException.....
      • 你好塞缪尔,你能分享你的代码吗......所以,我可以比较它并找到一些需要的更改......在此先感谢...... :)
      猜你喜欢
      • 1970-01-01
      • 2011-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多