Cannot use token/secret when making requests


#1

Hi,
I’m building an application in c++ using QT and QOAuth. I managed to retreave token/token secret for identifying users’ requests however I cannot manage to make such request.
I’m stuck with a “error”:“Rate limit exceeded. Clients may not make more than 150 requests per hour.”

My code is :
_oauthInterface->setConsumerKey(CONSUMER_KEY);
_oauthInterface->setConsumerSecret(CONSUMER_SECRET_KEY);

QOAuth::ParamMap params;
params.insert(“user_id”, QString::number(id).toAscii());
params.insert(“cursor”, cursor.toAscii());

QString url(“http://api.twitter.com/1/friends/ids.json”);
QByteArray header = _oauthInterface->createParametersString(url, QOAuth::GET, token.toUtf8(), tokenSecret.toUtf8(), QOAuth::HMAC_SHA1, params, QOAuth::ParseForHeaderArguments);

QNetworkRequest request;
if(!params.isEmpty())
url.append(_oauthInterface->inlineParameters(params, QOAuth::ParseForInlineQuery));
request.setUrl(url);
request.setRawHeader(“Authorization”, header);
_manager->get(request);

QObject::connect(_manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyHandler(QNetworkReply*)));

The headers seams to be correct. What did I miss ?