{"action":"created","issue":{"url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/10","labels_url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/10/comments","events_url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/10/events","html_url":"https://github.com/puneetkay/Facebook-PHP-CodeIgniter/issues/10","id":62619855,"number":10,"title":"Login seems not work at first time","user":{"login":"tthanhlong","id":2577264,"avatar_url":"https://avatars.githubusercontent.com/u/2577264?v=3","gravatar_id":"","url":"https://api.github.com/users/tthanhlong","html_url":"https://github.com/tthanhlong","followers_url":"https://api.github.com/users/tthanhlong/followers","following_url":"https://api.github.com/users/tthanhlong/following{/other_user}","gists_url":"https://api.github.com/users/tthanhlong/gists{/gist_id}","starred_url":"https://api.github.com/users/tthanhlong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tthanhlong/subscriptions","organizations_url":"https://api.github.com/users/tthanhlong/orgs","repos_url":"https://api.github.com/users/tthanhlong/repos","events_url":"https://api.github.com/users/tthanhlong/events{/privacy}","received_events_url":"https://api.github.com/users/tthanhlong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-18T08:03:43Z","updated_at":"2015-06-12T04:09:30Z","closed_at":null,"body":"At first time click on \"Login\" button, page is refresh and show \"Login\" button again (the same happenes on the Demo). So we have to click \"Login\" one more time for logging in. From the second times, it works properly.\r\nHow to fix this, please help!\r\n\r\nThanks and regards!"},"comment":{"url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/comments/111349830","html_url":"https://github.com/puneetkay/Facebook-PHP-CodeIgniter/issues/10#issuecomment-111349830","issue_url":"https://api.github.com/repos/puneetkay/Facebook-PHP-CodeIgniter/issues/10","id":111349830,"user":{"login":"tthanhlong","id":2577264,"avatar_url":"https://avatars.githubusercontent.com/u/2577264?v=3","gravatar_id":"","url":"https://api.github.com/users/tthanhlong","html_url":"https://github.com/tthanhlong","followers_url":"https://api.github.com/users/tthanhlong/followers","following_url":"https://api.github.com/users/tthanhlong/following{/other_user}","gists_url":"https://api.github.com/users/tthanhlong/gists{/gist_id}","starred_url":"https://api.github.com/users/tthanhlong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tthanhlong/subscriptions","organizations_url":"https://api.github.com/users/tthanhlong/orgs","repos_url":"https://api.github.com/users/tthanhlong/repos","events_url":"https://api.github.com/users/tthanhlong/events{/privacy}","received_events_url":"https://api.github.com/users/tthanhlong/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T04:09:29Z","updated_at":"2015-06-12T04:09:29Z","body":"Hi @axu34 :\r\n\r\nFixed the problem by removing <pre>$this->facebook->destroySession();</pre>\r\n\r\n<pre>\r\nif ($user) {\r\n            try {\r\n                $data['user_profile'] = $this->facebook->api('/me');\r\n            } catch (FacebookApiException $e) {\r\n                $user = null;\r\n            }\r\n        }else {\r\n            $this->facebook->destroySession();\r\n        }\r\n</pre>\r\n\r\nRegards!"}}