DirkGroenen\Pinterest\Auth\PinterestOAuth::getLoginUrl PHP Method

getLoginUrl() public method

Returns the login url
public getLoginUrl ( string $redirect_uri, array $scopes = ["read_public"], $response_type = "code" ) : string
$redirect_uri string
$scopes array
return string
    public function getLoginUrl($redirect_uri, $scopes = array("read_public"), $response_type = "code")
    {
        $queryparams = array("response_type" => $response_type, "redirect_uri" => $redirect_uri, "client_id" => $this->client_id, "client_secret" => $this->client_secret, "scope" => implode(",", $scopes), "state" => $this->state);
        // Build url and return it
        return sprintf("%s?%s", self::AUTH_HOST, http_build_query($queryparams));
    }