summaryrefslogtreecommitdiffstats
path: root/examples/oauth/twittertimeline/twitter.cpp
diff options
context:
space:
mode:
authorNicolas Ettlin <nicolas.ettlin@me.com>2018-07-02 17:12:26 +0200
committerNicolas Ettlin <nicolas.ettlin@me.com>2018-07-03 11:39:55 +0000
commit55b80f9e7b0a81cf6c80ae0a381a20641194c09e (patch)
treefa94e5979004abbbe0f83eaf26018e5fedce71f7 /examples/oauth/twittertimeline/twitter.cpp
parent1b2c97d27ab420a893fbd45e864ad29986aa49e0 (diff)
Fix the twittertimeline example
The ‘twittertimeline’ example wasn’t working because it couldn’t find a callback URL to redirect the user to. This was fixed by forcing the HTTP server to listen to a specific port (1337), as it’s done in the Reddit example. This commit also updates the documentation to explain how the users should configure the callback URL on their Twitter app settings. Task-number: QTBUG-68632 Change-Id: Idaaa550ecc37b42f91efa80f63b03d9c222c2e96 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Diffstat (limited to 'examples/oauth/twittertimeline/twitter.cpp')
-rw-r--r--examples/oauth/twittertimeline/twitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/oauth/twittertimeline/twitter.cpp b/examples/oauth/twittertimeline/twitter.cpp
index ddc174b..8529537 100644
--- a/examples/oauth/twittertimeline/twitter.cpp
+++ b/examples/oauth/twittertimeline/twitter.cpp
@@ -67,7 +67,7 @@ Twitter::Twitter(const QString &screenName,
QObject *parent) :
QOAuth1(clientCredentials.first, clientCredentials.second, nullptr, parent)
{
- replyHandler = new QOAuthHttpServerReplyHandler(this);
+ replyHandler = new QOAuthHttpServerReplyHandler(1337, this);
replyHandler->setCallbackPath("callback");
setReplyHandler(replyHandler);
setTemporaryCredentialsUrl(QUrl("https://api.twitter.com/oauth/request_token"));