Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > f9d378bd43bed351c74fe3dbfbb735f1 > files > 12

libqoauth-qt5-devel-2.0.1-2.mga6.armv7hl.rpm

// if necessary, create a map of additional arguments required by the Service Provider
QOAuth::ParamMap otherArgs;
otherArgs.insert( "misc_arg1", "value1" );
otherArgs.insert( "misc_arg2", "value2" );

// send a request to exchange Request Token for an Access Token
QOAuth::ParamMap reply =
    qoauth->accessToken( "http://example.com/access_token", QOAuth::POST, token,
                         tokenSecret, QOAuth::HMAC_SHA1, otherArgs );

// if no error occurred, read the Access Token (and other arguments, if applicable)
if ( qoauth->error() == QOAuth::NoError ) {
  token = reply.value( QOAuth::tokenParameterName() );
  tokenSecret = reply.value( QOAuth::tokenSecretParameterName() );
  otherInfo = reply.value( "misc_arg3" );
}