{"action":"opened","issue":{"url":"https://api.github.com/repos/scribejava/scribejava/issues/876","repository_url":"https://api.github.com/repos/scribejava/scribejava","labels_url":"https://api.github.com/repos/scribejava/scribejava/issues/876/labels{/name}","comments_url":"https://api.github.com/repos/scribejava/scribejava/issues/876/comments","events_url":"https://api.github.com/repos/scribejava/scribejava/issues/876/events","html_url":"https://github.com/scribejava/scribejava/issues/876","id":367102791,"node_id":"MDU6SXNzdWUzNjcxMDI3OTE=","number":876,"title":"Threw an exception when serializing: class org.scribe.exceptions.OAuthException :: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=Invalid%20redirect'","user":{"login":"pradeepjadi","id":36497042,"node_id":"MDQ6VXNlcjM2NDk3MDQy","avatar_url":"https://avatars1.githubusercontent.com/u/36497042?v=4","gravatar_id":"","url":"https://api.github.com/users/pradeepjadi","html_url":"https://github.com/pradeepjadi","followers_url":"https://api.github.com/users/pradeepjadi/followers","following_url":"https://api.github.com/users/pradeepjadi/following{/other_user}","gists_url":"https://api.github.com/users/pradeepjadi/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepjadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepjadi/subscriptions","organizations_url":"https://api.github.com/users/pradeepjadi/orgs","repos_url":"https://api.github.com/users/pradeepjadi/repos","events_url":"https://api.github.com/users/pradeepjadi/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepjadi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-05T08:06:37Z","updated_at":"2018-10-05T08:06:37Z","closed_at":null,"author_association":"NONE","body":" final String  PROTECTED_RESOURCE_URL = \"http://api.linkedin.com/v1/people/~/connections:(id,last-name)\";   \r\n     \t   OAuthService service = new ServiceBuilder()\r\n                   .provider(LinkedInApi.class)\r\n                   .apiKey(\"81y5xe32olibcj\")\r\n                   .apiSecret(\"Bc1wJ6yZeLTaCiLi\")\r\n                   .build();\r\n     \t  try{\r\n                  //In the constructor the AuthHandler goes through the chain of calls to create an Access Token\r\n                  Scanner in = new Scanner(System.in);\r\n                  System.out.println(\"=== LinkedIn's OAuth Workflow ===\");\r\n                  System.out.println();\r\n\r\n                  // Obtain the Request Token\r\n                  System.out.println(\"Fetching the Request Token...\");\r\n                  Token requestToken = service.getRequestToken();\r\n                  System.out.println(\"Got the Request Token!\");\r\n                  System.out.println();\r\n\r\n                  System.out.println(\"Now go and authorize Scribe here:\");\r\n                  System.out.println(service.getAuthorizationUrl(requestToken));\r\n                  System.out.println(\"And paste the verifier here\");\r\n                  System.out.print(\">>\");\r\n                  Verifier verifier = new Verifier(in.nextLine());\r\n                  System.out.println();\r\n\r\n                  // Trade the Request Token and Verfier for the Access Token\r\n                  System.out.println(\"Trading the Request Token for an Access Token...\");\r\n                  Token accessToken = service.getAccessToken(requestToken, verifier);\r\n                  System.out.println(\"Got the Access Token!\");\r\n                  System.out.println(\"(if your curious it looks like this: \" + accessToken + \" )\");\r\n                  System.out.println();\r\n\r\n                  // Now let's go and ask for a protected resource!\r\n                  System.out.println(\"Now we're going to access a protected resource...\");\r\n                  OAuthRequest request = new OAuthRequest(Verb.GET, PROTECTED_RESOURCE_URL);\r\n                  service.signRequest(accessToken, request);\r\n                  Response response = request.send();\r\n                  System.out.println(\"Got it! Lets see what we found...\");\r\n                  System.out.println();\r\n                  System.out.println(response.getBody());\r\n\r\n                  System.out.println();\r\n                  System.out.println(\"Thats it man! Go and build something awesome with Scribe! :)\");\r\n\r\n          }catch (Exception e){\r\n              System.out.println(\"Threw an exception when serializing: \" + e.getClass() + \" :: \" + e.getMessage());\r\n          }\r\n\r\n\r\n\r\n\r\nout put is:   === LinkedIn's OAuth Workflow ===\r\n\r\nFetching the Request Token...\r\nThrew an exception when serializing: class org.scribe.exceptions.OAuthException :: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=Invalid%20redirect'\r\n"}}
{"actor":{"display_login":"pradeepjadi"}}