To expand Chancho's answer, the SDK will check if the session is active before it tries to store any data in it. There are three ways around this.
Launch your own PHP session
PHP-, Chancho . , session_start(); script .
-, Codeigniter, Yii, CakePHP, Laravel .., . , , \Facebook\FacebookRedirectLoginHelper. storeState() loadState(). SDK, $_SESSION.
GitHub SDK laravel. laravel:
class MyFacebookRedirectLoginHelper extends \Facebook\FacebookRedirectLoginHelper
{
protected function storeState($state)
{
Session::put('state', $state);
}
protected function loadState()
{
return $this->state = Session::get('state');
}
}
SDK , , , . FacebookRedirectLoginHelper::disableSessionStatusCheck().
, .
$helper = new FacebookRedirectLoginHelper('*******');
$helper->disableSessionStatusCheck();
$session = $helper->getSessionFromRedirect();
, !