pipacs / o2

OAuth 2.0 for Qt
BSD 2-Clause "Simplified" License
317 stars 147 forks source link

O1::onTokenRequestError: 204 "Host requires authentication" #27

Closed mrozbarry closed 10 years ago

mrozbarry commented 10 years ago

I am developing a Qt5 Twitter application, but was running into an issue during authentication. When my application attempts to authenticate, I get the following on stdout:

"The name org.ofono was not provided by any .service files" "The name org.ofono was not provided by any .service files" O1::link O1::onTokenRequestError: 204 "Host requires authentication" "<?xml version="1.0" encoding="UTF-8"?> <hash> <error>Desktop applications only support the oauth_callback value 'oob'</error> <request>/oauth/request_token</request> </hash> "

What's strange is I am able to launch OAuth from the twitterdemo example application provided.

Here is the relevant snippets of my class.

Again, the provided twitterdemo doesn't output any sort of stderr/stdout errors, and behaves exactly as expected.

I'm including all of the o2 source files, through the pri file provided, so I don't think it's any sort of missing dependency.

I'm using the following QT modules in my pro file: core gui network webkit webkitwidgets script

pipacs commented 10 years ago

Looks like your app is not (or not properly) registered with Twitter.

mrozbarry commented 10 years ago

Based on my code, I'm starting QBirdStream by doing:

new QBirdStream( "<consumer_key>", "<consumer_secret>", this );

This eventually translates to:

O1Twitter_object->setClientId( "<consumer_key>" );
O1Twitter_object->setClientSecret( "<consumer_secret>" );

The documentation isn't completely clear in O1Twitter.h - is that supposed to be the consumer key/secret, or something else?