src/Gelembjuk/Auth/SocialLogin/Facebook.php
public function completeLogin($extrainputs = array()) {
		$facebook = $this->getFacebookObject();
		
		// we are not sure about $_GET contains all correct data
		// as in this model data are posted with $extrainputs
		// ideally it would be good if facebook lib accept data not only from _GET but also from any array
		$old_GET = $_GET;
		$_GET = $extrainputs;
		
		$helper = $facebook->getRedirectLoginHelper();

		// don't catch exceptions. it will be done in the model or controller
		$accessToken = $helper->getAccessToken();
		
		$_GET = $old_GET;
		
		if (! isset($accessToken)) {
			if ($helper->getError()) {
				throw new \Exception($helper->getError().' '.
					$helper->getErrorCode().' '.
					$helper->getErrorReason().' '.
					$helper->getErrorDescription());
    			} else {
    				throw new \Exception('Unknown error from Facebook');
    			}
  		}

  		$this->accesstoken = $accessToken;
  		
  		return $this->getUserProfile();
	}
public function completeLogin($extrainputs = array()) {
		$facebook = $this->getFacebookObject();
		
		// we are not sure about $_GET contains all correct data
		// as in this model data are posted with $extrainputs
		// ideally it would be good if facebook lib accept data not only from _GET but also from any array
		$old_GET = $_GET;
		$_GET = $extrainputs;
		
		$helper = $facebook->getRedirectLoginHelper();

		// don't catch exceptions. it will be done in the model or controller
		$accessToken = $helper->getAccessToken();
		
		$_GET = $old_GET;
		
		if (! isset($accessToken)) {
			if ($helper->getError()) {
				throw new \Exception($helper->getError().' '.
					$helper->getErrorCode().' '.
					$helper->getErrorReason().' '.
					$helper->getErrorDescription());
    			} else {
    				throw new \Exception('Unknown error from Facebook');
    			}
  		}

  		$this->accesstoken = $accessToken;
  		
  		return $this->getUserProfile();
	}
public function completeLogin ( $ extrainputs = array ( ) ) { $ facebook = $ this -> getFacebookObject ( ) ; // we are not sure about $_GET contains all correct data // as in this model data are posted with $extrainputs // ideally it would be good if facebook lib accept data not only from _GET but also from any array $ old_GET = $ _GET ; $ _GET = $ extrainputs ; $ helper = $ facebook -> getRedirectLoginHelper ( ) ; // don't catch exceptions. it will be done in the model or controller $ accessToken = $ helper -> getAccessToken ( ) ; $ _GET = $ old_GET ; if ( ! isset ( $ accessToken ) ) { if ( $ helper -> getError ( ) ) { throw new \ Exception ( $ helper -> getError ( ) . ' ' . $ helper -> getErrorCode ( ) . ' ' . $ helper -> getErrorReason ( ) . ' ' . $ helper -> getErrorDescription ( ) ) ; } else { throw new \ Exception ( 'Unknown error from Facebook' ) ; } } $ this -> accesstoken = $ accessToken ; return $ this -> getUserProfile ( ) ; }
Completes social login. Is caled after redirect from facebook auth page

@param array $extrainputs List of POST/GET arguments names
Completes social login . Is caled after redirect from facebook auth page