{"action":"created","issue":{"url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/173","repository_url":"https://api.github.com/repos/artdarek/oauth-4-laravel","labels_url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/173/comments","events_url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/173/events","html_url":"https://github.com/artdarek/oauth-4-laravel/issues/173","id":143882749,"number":173,"title":"(Facebook Login) Failed to request resource. HTTP Code: HTTP/1.1 400 Bad Request","user":{"login":"chhumsina","id":3894767,"avatar_url":"https://avatars.githubusercontent.com/u/3894767?v=3","gravatar_id":"","url":"https://api.github.com/users/chhumsina","html_url":"https://github.com/chhumsina","followers_url":"https://api.github.com/users/chhumsina/followers","following_url":"https://api.github.com/users/chhumsina/following{/other_user}","gists_url":"https://api.github.com/users/chhumsina/gists{/gist_id}","starred_url":"https://api.github.com/users/chhumsina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chhumsina/subscriptions","organizations_url":"https://api.github.com/users/chhumsina/orgs","repos_url":"https://api.github.com/users/chhumsina/repos","events_url":"https://api.github.com/users/chhumsina/events{/privacy}","received_events_url":"https://api.github.com/users/chhumsina/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-03-28T03:19:23Z","updated_at":"2016-09-09T14:06:55Z","closed_at":null,"body":"![1](https://cloud.githubusercontent.com/assets/3894767/14070264/8323e370-f4ce-11e5-8e78-6785d418ce97.PNG)\r\n![2](https://cloud.githubusercontent.com/assets/3894767/14070263/82ecc728-f4ce-11e5-9a88-bbb514c538d3.PNG)\r\n\r\nThanks you"},"comment":{"url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/comments/245922970","html_url":"https://github.com/artdarek/oauth-4-laravel/issues/173#issuecomment-245922970","issue_url":"https://api.github.com/repos/artdarek/oauth-4-laravel/issues/173","id":245922970,"user":{"login":"mrbarde","id":3317665,"avatar_url":"https://avatars.githubusercontent.com/u/3317665?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbarde","html_url":"https://github.com/mrbarde","followers_url":"https://api.github.com/users/mrbarde/followers","following_url":"https://api.github.com/users/mrbarde/following{/other_user}","gists_url":"https://api.github.com/users/mrbarde/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbarde/subscriptions","organizations_url":"https://api.github.com/users/mrbarde/orgs","repos_url":"https://api.github.com/users/mrbarde/repos","events_url":"https://api.github.com/users/mrbarde/events{/privacy}","received_events_url":"https://api.github.com/users/mrbarde/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T14:06:55Z","updated_at":"2016-09-09T14:06:55Z","body":"@FebriPratama @chhumsina think i figured it out, you can't request for an access token more than once so the person will have to rerun the login process again, to avoid this try wrapping the code snippet for requesting access token in a try catch scope like so.\r\n\r\n```\r\ntry{\r\n    // This was a callback request from facebook, get the token\r\n    $token = $fb->requestAccessToken( $code );\r\n    // Send a request with it\r\n    $result = json_decode( $fb->request( '/me' ), true );\r\n}catch(Exception $e){\r\n    return Redirect::to('auth/login')->with(\"sys_message\", [\"body\"=>\"An error occurred please try again.\"])\r\n}\r\n\r\n```\r\nHope this helped."}}
{"actor":{"display_login":"mrbarde"}}