Closed tedr56 closed 6 years ago
I encountered the exact same issue as described here. After some debugging I found that I need to have the parameters in the URL as well as in the list of O1RequestParameter.
I think that in your case, you would need to write:
O1Requestor* requestor = new O1Requestor(manager, o1, this);
QByteArray idName("id");
QList<O1RequestParameter> reqParams = QList<O1RequestParameter>();
reqParams << O0RequestParameter(idName, tweet_id.toLatin1());
QUrl url = QUrl(QString("https://api.twitter.com/1.1/statuses/oembed.json?id=" + tweet_id));
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
QNetworkReply *replyEmbed = requestor->get(request, reqParams);
connect(replyEmbed, SIGNAL(finished()), this, SLOT(addTweet()));
Thanks for the update. Indeed in OAuth 1.0, query parameters, too, should participate in the request signing.
I discovered lately all the OAuth process and for POST method, your great lib worked just fine.
Until I tried to use Oembed from Twitter using the GET method.
I've seen the issue #19 which use setToken and setTokenSecret. I wonder how since these methods are protected.
For my part, it's nothing fancy, I just try this
with
and successfully linked.
No matter what, I always get in response
I tried to qDebug the authParams, but it seems quite the same as the Twitter Oauth Generator
Any help would be really appreciated. Thanks.