public function api($method, $path, $parameters = null, $version = null, $etag = null)
        {
            $session = new FacebookSession($this->getAccessToken());

            $request = with(new FacebookRequest($session, $method, $path, $parameters, $version, $etag))
                ->execute()
                ->getGraphObject(GraphUser::className());

            return $request;
        }
public function api($method, $path, $parameters = null, $version = null, $etag = null)
        {
            $session = new FacebookSession($this->getAccessToken());

            $request = with(new FacebookRequest($session, $method, $path, $parameters, $version, $etag))
                ->execute()
                ->getGraphObject(GraphUser::className());

            return $request;
        }
public function api ( $ method , $ path , $ parameters = null , $ version = null , $ etag = null ) { $ session = new FacebookSession ( $ this -> getAccessToken ( ) ) ; $ request = with ( new FacebookRequest ( $ session , $ method , $ path , $ parameters , $ version , $ etag ) ) -> execute ( ) -> getGraphObject ( GraphUser :: className ( ) ) ; return $ request ; }
Facebook API Call.

@param  string $method The request method.
@param  string $path The end points path.
@param  mixed $parameters Parameters.
@param  string $version The specified version of Api.
@param  mixed $etag
@return mixed
Facebook API Call .