{"action":"created","issue":{"url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/66","labels_url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/66/comments","events_url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/66/events","html_url":"https://github.com/SammyK/LaravelFacebookSdk/issues/66","id":78402315,"number":66,"title":"Cross-site request forgery validation failed. Required param \"state\" missing.","user":{"login":"sachintaware","id":1187801,"avatar_url":"https://avatars.githubusercontent.com/u/1187801?v=3","gravatar_id":"","url":"https://api.github.com/users/sachintaware","html_url":"https://github.com/sachintaware","followers_url":"https://api.github.com/users/sachintaware/followers","following_url":"https://api.github.com/users/sachintaware/following{/other_user}","gists_url":"https://api.github.com/users/sachintaware/gists{/gist_id}","starred_url":"https://api.github.com/users/sachintaware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachintaware/subscriptions","organizations_url":"https://api.github.com/users/sachintaware/orgs","repos_url":"https://api.github.com/users/sachintaware/repos","events_url":"https://api.github.com/users/sachintaware/events{/privacy}","received_events_url":"https://api.github.com/users/sachintaware/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-20T07:00:41Z","updated_at":"2015-06-11T06:18:55Z","closed_at":null,"body":"I dont know why,but I started getting this issue suddenly.I tried to debug and found in the `FacebookRedirectLoginHelper` the function `validateCsrf()` does not get the savedstate\r\n`$savedState = $this->persistentDataHandler->get('state');`\r\nI am not how to resolve this.I tried printing both the `$state` and `$savedState` and I get $savedState as `null`\r\nWhere am I making a mistake with this?\r\n \r\n    class FacebookController extends Controller {\r\n    public function fbConnect(LaravelFacebookSdk $fb)\r\n    {\r\n        // Obtain an access token.\r\n        try {\r\n            $token = $fb\r\n                ->getRedirectLoginHelper()\r\n                ->getAccessToken();\r\n        } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\r\n            dd($e->getMessage());\r\n        }\r\n        dd($token);\r\n        // Access token will be null if the user denied the request\r\n        // or if someone just hit this URL outside of the OAuth flow.\r\n        if (! $token) {\r\n            // Get the redirect helper\r\n            $helper = $fb->getRedirectLoginHelper();\r\n\r\n            if (! $helper->getError()) {\r\n                abort(403, 'Unauthorized action.');\r\n            }\r\n\r\n            // User denied the request\r\n            dd(\r\n                $helper->getError(),\r\n                $helper->getErrorCode(),\r\n                $helper->getErrorReason(),\r\n                $helper->getErrorDescription()\r\n            );\r\n        }\r\n      //Long lived token code after this\r\n "},"comment":{"url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/comments/111012139","html_url":"https://github.com/SammyK/LaravelFacebookSdk/issues/66#issuecomment-111012139","issue_url":"https://api.github.com/repos/SammyK/LaravelFacebookSdk/issues/66","id":111012139,"user":{"login":"sachintaware","id":1187801,"avatar_url":"https://avatars.githubusercontent.com/u/1187801?v=3","gravatar_id":"","url":"https://api.github.com/users/sachintaware","html_url":"https://github.com/sachintaware","followers_url":"https://api.github.com/users/sachintaware/followers","following_url":"https://api.github.com/users/sachintaware/following{/other_user}","gists_url":"https://api.github.com/users/sachintaware/gists{/gist_id}","starred_url":"https://api.github.com/users/sachintaware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachintaware/subscriptions","organizations_url":"https://api.github.com/users/sachintaware/orgs","repos_url":"https://api.github.com/users/sachintaware/repos","events_url":"https://api.github.com/users/sachintaware/events{/privacy}","received_events_url":"https://api.github.com/users/sachintaware/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T06:18:55Z","updated_at":"2015-06-11T06:18:55Z","body":"SammyK thank you for attention.Really appreciate​ your efforts and work.This package is really great.\r\nCheers"}}