protected function _oauthRequest($url, $params) {
    if (!isset($params['access_token'])) {
      $params['access_token'] = $this->getAccessToken();
    }

    if (isset($params['access_token'])) {
      $params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
    }

    // json_encode all params values that are not strings
    foreach ($params as $key => $value) {
      if (!is_string($value) && !($value instanceof CURLFile)) {
        $params[$key] = json_encode($value);
      }
    }

    return $this->makeRequest($url, $params);
  }
protected function _oauthRequest($url, $params) {
    if (!isset($params['access_token'])) {
      $params['access_token'] = $this->getAccessToken();
    }

    if (isset($params['access_token'])) {
      $params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
    }

    // json_encode all params values that are not strings
    foreach ($params as $key => $value) {
      if (!is_string($value) && !($value instanceof CURLFile)) {
        $params[$key] = json_encode($value);
      }
    }

    return $this->makeRequest($url, $params);
  }
protected function _oauthRequest ( $ url , $ params ) { if ( ! isset ( $ params [ 'access_token' ] ) ) { $ params [ 'access_token' ] = $ this -> getAccessToken ( ) ; } if ( isset ( $ params [ 'access_token' ] ) ) { $ params [ 'appsecret_proof' ] = $ this -> getAppSecretProof ( $ params [ 'access_token' ] ) ; } // json_encode all params values that are not strings foreach ( $ params as $ key => $ value ) { if ( ! is_string ( $ value ) && ! ( $ value instanceof CURLFile ) ) { $ params [ $ key ] = json_encode ( $ value ) ; } } return $ this -> makeRequest ( $ url , $ params ) ; }
Make a OAuth Request.

@param string $url The path (required)
@param array $params The query/post data

@return string The decoded response object
@throws FacebookApiException
Make a OAuth Request .