library/Garp/3rdParty/facebook/src/base_facebook.php
protected function getCode() {
    if (isset($_REQUEST['code'])) {
      if ($this->state !== null &&
          isset($_REQUEST['state']) &&
          $this->state === $_REQUEST['state']) {

        // CSRF state has done its job, so clear it
        $this->state = null;
        $this->clearPersistentData('state');
        return $_REQUEST['code'];
      } else {
        self::errorLog('CSRF state token does not match one provided.');
        return false;
      }
    }

    return false;
  }
protected function getCode() {
    if (isset($_REQUEST['code'])) {
      if ($this->state !== null &&
          isset($_REQUEST['state']) &&
          $this->state === $_REQUEST['state']) {

        // CSRF state has done its job, so clear it
        $this->state = null;
        $this->clearPersistentData('state');
        return $_REQUEST['code'];
      } else {
        self::errorLog('CSRF state token does not match one provided.');
        return false;
      }
    }

    return false;
  }
protected function getCode ( ) { if ( isset ( $ _REQUEST [ 'code' ] ) ) { if ( $ this -> state !== null && isset ( $ _REQUEST [ 'state' ] ) && $ this -> state === $ _REQUEST [ 'state' ] ) { // CSRF state has done its job, so clear it $ this -> state = null ; $ this -> clearPersistentData ( 'state' ) ; return $ _REQUEST [ 'code' ] ; } else { self :: errorLog ( 'CSRF state token does not match one provided.' ) ; return false ; } } return false ; }
Get the authorization code from the query parameters, if it exists,
and otherwise return false to signal no authorization code was
discoverable.

@return mixed The authorization code, or false if the authorization
code could not be determined.
Get the authorization code from the query parameters if it exists and otherwise return false to signal no authorization code was discoverable .