Results 1 to 2 of 2

Thread: problem with Google contacts using Qouath

  1. #1
    Join Date
    Jun 2011
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default problem with Google contacts using Qouath

    Hi,
    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


    Regards
    Abdul Moiz

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem with Google contacts using Qouath

    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.
    Last edited by ChrisW67; 24th June 2011 at 03:47.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. Problem with Google Map in WebView
    By handle0088 in forum Qt Quick
    Replies: 0
    Last Post: 20th June 2011, 10:33
  2. Replies: 1
    Last Post: 18th May 2011, 10:18
  3. qtMobility and symbian contacts
    By fuoco66 in forum Newbie
    Replies: 5
    Last Post: 14th March 2011, 00:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.