/** * Opens authorization url, this will open browser, Twitter will return PIN number * * @remarks Override if you want to show another browser. * Please call with returned PIN requestAccessToken slot to get access tokens * */ void OAuthTwitter::requestAuthorization() { QUrl authorizeUrl(TWITTER_AUTHORIZE_URL); authorizeUrl.addEncodedQueryItem("oauth_token", oauthToken()); authorizeUrl.addEncodedQueryItem("oauth_callback", "oob"); emit authorizePinAuthenticate(); QDesktopServices::openUrl(authorizeUrl); }
/** * Opens authorization url, this will open browser, Twitter will return PIN number * * @remarks Override if you want to show another browser. * Please call with returned PIN requestAccessToken slot to get access tokens * */ void OAuthTwitter::requestAuthorization() { QUrl authorizeUrl(TWITTER_AUTHORIZE_URL); QUrlQuery query; query.addQueryItem("oauth_token", oauthToken().toPercentEncoding()); query.addQueryItem("oauth_callback", "oob"); authorizeUrl.setQuery(query); emit authorizePinAuthenticate(); QDesktopServices::openUrl(authorizeUrl); }