0

I've just compiled QTweetLib on my linux host. I've compiled and run pinauthstatusupdate example without any changes. But when I try to get request_token I've get:

Failed to validate oauth signature and token

I synced time on my host:

using sudo ntpdate pool.ntp.org

But no changes...

The I changed consumer keys with keys which Twitter creates for my application. But I got same problem.

I checked the base string using http://quonos.nl/oauthTester/ and it says my base string is OK.

Here is raw header which QTweetLib creates:

OAuth oauth_consumer_key="YImPrR11sLxv0ZjjKAskA",oauth_signature_method="HMAC-SHA1",oauth_signature="WQnBaTgyuU6HkPT7DqTkNK1MT5c%3D",oauth_timestamp="1325542113",oauth_nonce="J5oUsjoOE34e1iTE",oauth_version="1.0"

So what's the problem?

Edward
  • 304
  • 2
  • 16

1 Answers1

0

According to QTweetLib's readme it supports only xAuth. Is your Twitter application xAuth enabled? If not you need to request it to be enabled for your application by sending email to api@twitter.com and stating some valid reasons why you can't just use OAuth.

Have you looked at KQOAuth (http://www.d-pointer.com/solutions/kqoauth/)? It supports 'normal' OAuth by utilizing the web browser of the environment and a temporary local web server. I think I read somewhere that it might get integrated to Qt5 in some form and thus it would probably be a safer bet than QTweetLib.

eburger
  • 470
  • 4
  • 10
  • QTweetLib supports PIN authentication. Also there are an example which uses PIN authetication. – Edward Jan 03 '12 at 20:34