/**
  * FacebookRequest - Returns a new request using the given session.  optional
  *   parameters hash will be sent with the request.  This object is
  *   immutable.
  *
  * @param FacebookSession $session
  * @param string $method
  * @param string $path
  * @param array|null $parameters
  * @param string|null $version
  * @param string|null $etag
  */
 public function __construct($session, $method, $path, $parameters = null, $version = null, $etag = null)
 {
     $this->session = $session;
     $this->method = $method;
     $this->path = $path;
     if ($version) {
         $this->version = $version;
     } else {
         $this->version = static::GRAPH_API_VERSION;
     }
     $this->etag = $etag;
     //echo "<pre>";print_r($session->getToken()); echo "</pre>"; die;
     $params = $parameters ?: array();
     if ($session && !isset($params["access_token"])) {
         $params["access_token"] = $session->getToken();
     }
     if (FacebookSession::useAppSecretProof() && !isset($params["appsecret_proof"])) {
         $params["appsecret_proof"] = $this->getAppSecretProof($params["access_token"]);
     }
     $this->params = $params;
 }