Page 1 of 1

Problems establishing OAuth for microblogging

Posted: Mon Nov 22, 2010 7:25 pm
by blog.brockha.us
I tried to establish the OAuth connection from the new microblogging plugin to my twitter accounts.
The first account was established without no visible problems and the plugin access is listed in my twitter connections. But when opening the tweeter, I only get "Incorrect signature" as a message for that account. Did anybody already had this problem, too, and knows how to fix this?

Second: I have another twitter account. I tried to initialize the OAuth connection process for that account again. The secrets handed by the first OAuth process didn't work, but registering the plugin again with another name for it didn't work either. In both cases I get a (German) error screen when hitting the Login ("Einloggen") button for this account:

Code: Select all

Fehler im Twitter Callback
TwitterOAuth Object
(
    [http_code] => 401
    ...
Does anybody have a solution for these problems?

Re: Problems establishing OAuth for microblogging

Posted: Tue Nov 23, 2010 1:05 pm
by garvinhicking
Hi!

Funnily, it worked for me a few weeks ago, but I also get "invalid signature" in my blog where it worked right now. I didn't have the time to dig into it, because I find the twitter API system to be quite obfuscated. :(

Maybe they changed something again in their API because everything worked properly some time ago :(

Regards,
Garvin

Re: Problems establishing OAuth for microblogging

Posted: Tue Nov 23, 2010 1:09 pm
by garvinhicking
Hi!

Hm, I still got the signature error and I just removed the connection in the plugin configuration, then entered the existing consumer key / secret (from my twitter.com/apps page) and then created the new connection, went into plugin configuration again, used the "login" button, and then everything's working again now...?!

I've never tried multi-twitter-accounts, though. Intenrally the plugin simply saves a running profile index (1, 2, 3...) to which it stores distinct consumer keys and tokens...

You might want to check the serendipity_config DB table and see what your token and keys look like and if they match your apps information=?

Regards,
Garvin

Re: Problems establishing OAuth for microblogging

Posted: Tue Nov 23, 2010 4:31 pm
by blog.brockha.us
Cool, garvin. Reconnecting the twitter acc the way you described it, worked for me, too. Thanks!
Still I am unable to connect my second twitter acc. This is a test account, so it is not that important, but if I find the time for it, I will try to investigate this problem.

But I found a problem in the Tweeter, that might produce other problems (remembering last tweets i.e).

The links under the tweet time look like this:
http://twitter.com/yellowled/status/7.09030805137E+15

but should look like this:
http://twitter.com/yellowled/status/7090308051369984

There seems to be a number conversion inside the code, that "corrupts" the tweet numbers..

Re: Problems establishing OAuth for microblogging

Posted: Wed Nov 24, 2010 10:19 pm
by garvinhicking
Hi!

I think when the author of the twitter plugin created the DB tables he made it just too small for current twitter IDs. The current twitter plugin should upgrade some table from varchar(15) to varchar(20)...

HTH,
Garvin

Re: Problems establishing OAuth for microblogging

Posted: Fri Nov 26, 2010 7:31 pm
by blog.brockha.us
Ahem.. I guess this was me, who established this database field. :oops: :lol:

I had a close look into this: In my blog the database was updated correctly and the last_tweet_id's aren't listed in the exponential way. But this is not a save sign, as backtweet is so slow at the moment, that I don't know, when the last tweet really was found and added in my blog.

Edit: Ah! In this moment my blog fetched a new tweetback and the ID is stored in the "normal" way. Perfect!

But I fixed the status link in the tweeter in twitter mode. Twitter changed the json interface slightly. id ist holding the exponential version, id_str is the one, we want.

I released the fix into Spartacus.