Hi Taylor,
Thank you for your input. Here are details:
1. Additional sources:
void OAuthTwitter::authorizeXAuth(const QString &username, const
QString &password)
{
Q_ASSERT(m_netManager != 0);
QUrl url(TWITTER_ACCESS_TOKEN_XAUTH_URL);
url.addQueryItem("x_auth_username", username);
url.addQueryItem("x_auth_password", password);
url.addQueryItem("x_auth_mode", "client_auth");
QByteArray oauthHeader = generateAuthorizationHeader(url,
OAuth::POST);
QNetworkRequest req(url);
req.setRawHeader(AUTH_HEADER, oauthHeader);
QNetworkReply *reply = m_netManager->post(req, QByteArray());
connect(reply, SIGNAL(finished()), this,
SLOT(finishedAuthorization()));
}
2. HTTP request:
POST
3. Url (content of 'url' object):
https://api.twitter.com/oauth/access_token?x_auth_username=myn...@o2.pl&x_auth_password=mypassword&x_auth_mode=client_auth
4. Authorization header (content of 'oauthHeader' object):
OAuth oauth_consumer_key="myconsumerkey",oauth_signature_method="HMAC-
SHA1",oauth_signature="kqb27IFO2BM3iEO4fhfYK%2BbTc3Y
%3D",oauth_timestamp="1304491190",oauth_nonce="3uLG1a72zvcGdyJr",oauth_version="1.0"
5. Body:
none (empty)
6. Additional observations:
When I type username instead of e-mail (currently I use e-mail and
password to login to Twitter) then xAuth pass successfully but only on
the simulator and only first time... Reproducibility 100%.
Best Regarrds,
Pawel
On 2 Maj, 16:56, Taylor Singletary <
taylorsinglet...@twitter.com>
wrote:
> Hi Pawel,
>
> OAuth problems tend to require digging a bit deeper than surface error
> messages to debug -- to help you in this case, we would need to know at
> minimum: the HTTP Authorization header used in your request, the format of
> the POST body you are sending (but not the actual usernames and passwords),
> and the exact URL you are accessing -- all details that the library you are
> using likely make difficult, but not impossible, to ascertain. The signature
> base string is also extremely useful for debugging, but also requires you to
> filter out details of usernames and passwords.
>
> In most cases a problem like this is due to a parameter encoding error or by
> a request with POST bodies and signature base strings not in agreement.
>
> @episod <
http://twitter.com/episod> - Taylor Singletary