View Full Version : problem with Google contacts using Qouath

23rd June 2011, 12:46
I am writing an Qt application using QOauth library to access google contacts.
But I am not getting the Oauth token and Oauth token secret from the server.

Here is my code snippet:

QByteArray token;
QByteArray tokenSecret;

QOAuth::Interface *qoauth = new QOAuth::Interface;

qoauth->setConsumerKey( "anonymous" );
qoauth->setConsumerSecret( "anonymous" );

qoauth->setRequestTimeout( 10000 );

// send a request for an unauthorized token
QOAuth::ParamMap reply = qoauth->requestToken( "http://www.google.com/accounts/OAuthGetRequestToken",
QOAuth::GET, QOAuth::HMAC_SHA1 );

// if no error occurred, read the received token and token secret
if (qoauth->error() == QOAuth::NoError ) {
qDebug(" QOAuth::NoError");
token = reply.value( QOAuth::tokenParameterName() );
tokenSecret = reply.value(QOAuth::tokenSecretParameterName() );

When I run the application I am getting the following result:

Object::connect: No such signal QNetworkAccessManager::sslErrors(QNetworkReply*,QL ist<QSslError>)
_q_parseReply - oauth_token not present in reply!
_q_parseReply - oauth_token_secret not present in reply!

Can Anyone help me in solving the problem

Abdul Moiz

24th June 2011, 00:20
At a guess I would say that your Qt has been configured without OpenSSL support which would make sslErrors() unavailable. I expect that QOAuth depends on working SSL support, and the https: URL certainly does.