Gajus\Fuss\Request::getUrl PHP Méthode

getUrl() public méthode

Get URL that will be used to make the request, including the access token and appsecret_proof.
public getUrl ( ) : string
Résultat string
    public function getUrl()
    {
        $path = $this->path;
        if (!$this->isPathVersioned() && ($version = $this->session->getAccessToken()->getApp()->getOption(\Gajus\Fuss\App::OPTION_VERSION))) {
            $path = $version . '/' . $path;
        }
        $url = 'https://graph.facebook.com/' . $path;
        $this->query['access_token'] = $this->session->getAccessToken()->getPlain();
        $this->query['appsecret_proof'] = $this->getAppSecretProof();
        // [GraphMethodException] API calls from the server require an appsecret_proof argument
        // [GraphMethodException] Invalid appsecret_proof provided in the API argument
        $url .= '?' . http_build_query($this->query);
        return $url;
    }