使用 Linkedin-j 的 Linkedin 桌面应用程序?

发布于 2024-11-16 21:16:46 字数 2290 浏览 0 评论 0原文

我正在使用 LinkedIn-j api 制作 Linkedin 应用程序。我面临的问题是我想开发一个简单的桌面应用程序。相反,我必须说控制台应用程序。问题出现在我收到此错误的地方

Exception in thread "main" com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.linkedin.com
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:159)
    at com.lineedapp.common.LinkedinApp.main(LinkedinApp.java:17)
Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.linkedin.com
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
    at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:148)
    ... 1 more
Caused by: java.net.UnknownHostException: api.linkedin.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
    at oauth.signpost.basic.DefaultOAuthProvider.sendRequest(DefaultOAuthProvider.java:48)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:177)
    ... 3 more

,我想我无法在应用程序注册表中提供主机。我确实提供了本地主机,但它不起作用。请帮忙??

I am using LinkedIn-j api for making a Linkedin application.The problem that I am facing is that I want to develop a simple desktop application. Rather I must say a console application. The problem comes where I get this error

Exception in thread "main" com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.linkedin.com
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:159)
    at com.lineedapp.common.LinkedinApp.main(LinkedinApp.java:17)
Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.linkedin.com
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
    at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:148)
    ... 1 more
Caused by: java.net.UnknownHostException: api.linkedin.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
    at oauth.signpost.basic.DefaultOAuthProvider.sendRequest(DefaultOAuthProvider.java:48)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:177)
    ... 3 more

I suppose I am not able to provide a host in the application registration form. I did Provide Local host but its not working. Please Help??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

东风软 2024-11-23 21:16:46
Caused by: java.net.UnknownHostException: api.linkedin.com

您似乎没有 api.linkedin.com 的网络访问权限。确保无论您是否使用代理,您都可以访问 https://api.linkedin.com

Caused by: java.net.UnknownHostException: api.linkedin.com

It looks like you don't have network access to api.linkedin.com. Make sure that, if you are behind a proxy or not, you have access to https://api.linkedin.com.

╭ゆ眷念 2024-11-23 21:16:46

java.net.UnknownHostException: api.linkedin.com 意味着您无法访问服务器。

检查您是否位于代理后面。如果是这样,您必须在 linkedin API 中找到绕过此代理的方法。

The java.net.UnknownHostException: api.linkedin.com means that you are not able to reach the server.

Check that your are not behind a proxy. If so, you have to find a way to bypass this proxy in the linkedin API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文