I face serious problems by adding a simple twitterfeed to a website. Installed, uninstalled and reinstalled 6.x-5.0 [also latest 6.x dev version] several times [tables were actually removed from database after unistall]. Created an application, created access token, completed the consumer key and secret within Drupal and hit the button to add the account. After login at twitter authenticate page I still receive the "Invalid Twitter OAuth request" error when returning to the website.

Comments

madhattertech’s picture

I too have installed / reinstalled twitter 6.x-5.0 multiple times, and tried the dev verion as well. I have tried with oAuth version 6.x-3.0-beta4 and oauth version 6.x-3.x-dev.

I had the same issue: Created an application, created access token, completed the consumer key and secret within Drupal and hit the button to add the account. After login at twitter authenticate page I still receive the "Invalid Twitter OAuth request" error when returning to the website.

I checked the logs, and I see an error:

exception 'TwitterException' with message '<' in sites/all/modules/twitter/twitter.lib.php:135

The twitter account does not get added to Drupal.

sheldon rampton’s picture

This is probably the same issue that is being discussed for the Drupal 7 version of the Twitter module:

http://drupal.org/node/1924478

The Drupal 7 version already has a patch that fixes the bug, which was created when Twitter changed their API without notice to fix what was apparently some kind of urgent security concern:

https://dev.twitter.com/discussions/16443

Since the patch for the Drupal 7 applies to a class library that is common to both the Drupal 6 and Drupal 7 versions of the Twitter module, you can apply the same Drupal 7 patch against your Drupal 6 version. I just tested and confirmed that the Drupal 7 patch applies cleanly even against the Drupal 6 version of this module.

designate’s picture

Status: Active » Closed (fixed)

Patch for D7 works indeed, thanks! Marking issue as closed.

roesch’s picture

Status: Active » Closed (fixed)

How to use this patch?
I found this link.
But what to do with the code?
I can access the twitter.lib.php, i know how to add some line and delete some others, but I am not a PHP expert.
thanks for helping.

[edit]
ok, need to learn new stuff
http://drupal.org/patch/apply
[/edit]

luisgrisolia’s picture

Status: Closed (fixed) » Active

Hi #5 patch won't apply 'cleanly' in 6.x-5.0 version of twitter module...
This is the patch i'm unising:

http://drupal.org/files/twitter_oauth_verifier-1924478-5.patch

This is the output:

user@serve:mysite/sites/all/modules/twitter$ patch -p0 -i twitter_oauth_verifier-1924478-5.patch

patching file b/twitter.lib.php
Hunk #1 FAILED at 73.
1 out of 1 hunk FAILED -- saving rejects to file b/twitter.lib.php.rej
patching file b/twitter.pages.inc
Hunk #1 FAILED at 421.
1 out of 1 hunk FAILED -- saving rejects to file b/twitter.pages.inc.rej

Did you use the same patch or another version?

Did you modified it?

Thank's in advance

sheldon rampton’s picture

@luisgrisolia Can you try patching against the 6.x-5.x-dev version (not the 6.x-5.0 version) and see if that works?

luisgrisolia’s picture

Status: Closed (fixed) » Active

Same result on dev version...

user@server:/tmp/twitter$ patch -p0 -i twitter_oauth_verifier-1924478-5.patch 
patching file b/twitter.lib.php
Hunk #1 FAILED at 73.
1 out of 1 hunk FAILED -- saving rejects to file b/twitter.lib.php.rej
patching file b/twitter.pages.inc
Hunk #1 FAILED at 421.
1 out of 1 hunk FAILED -- saving rejects to file b/twitter.pages.inc.rej

bump !!

sheldon rampton’s picture

@luisgrisolia: This is the command you should be using to apply the patch:

git apply -v twitter_oauth_verifier-1924478-5.patch

I just tried it myself against 6.x-5.x, and it applied cleanly.

juampynr’s picture

Status: Active » Closed (duplicate)