This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 2nd, 2014  |  syntax: None  |  size: 3.10 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. oAuthService=LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(key, secret);
  2.         request=oAuthService.getOAuthRequestToken("http://www.google.com");
  3.        
  4. Exception in thread "main" com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Server returned HTTP response code: 400 for URL: https://api.linkedin.com/uas/oauth/requestToken
  5.     at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:180)
  6.     at com.cpt.linkedin.linkedINExample.authorize(linkedINExample.java:57)
  7.     at com.cpt.linkedin.linkedINExample.main(linkedINExample.java:38)
  8. Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Server returned HTTP response code: 400 for URL: https://api.linkedin.com/uas/oauth/requestToken
  9.     at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
  10.     at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
  11.     at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:172)
  12.     ... 2 more
  13. Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://api.linkedin.com/uas/oauth/requestToken
  14.     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  15.     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  16.     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  17.     at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
  18.     at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1458)
  19.     at java.security.AccessController.doPrivileged(Native Method)
  20.     at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1452)
  21.     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1106)
  22.     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
  23.     at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getContent(HttpURLConnectionResponseAdapter.java:18)
  24.     at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:228)
  25.     at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
  26.     ... 4 more
  27. Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://api.linkedin.com/uas/oauth/requestToken
  28.     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
  29.     at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:397)
  30.     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
  31.     at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getStatusCode(HttpURLConnectionResponseAdapter.java:22)
  32.     at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:178)
  33.     ... 4 more
clone this paste RAW Paste Data