This morning I configured twitter signin module correctly.

If an anonimous user tried to signin with his twitter account, all was work correctly, but his username was "_1".
I have another site where usernames of users who signin with their twitter account are their twitter account name.

It seems the configuration is the same in both sites, but I try to reconfigure my first site. Now, when a user (or an anonimous user) try to signin with his twitter account, site says "Invalid Twitter OAuth request".

In configuration all seems to be ok,

I have tried to reinstall both twitter and twitter signin modules but error persists...what could be done??

Comments

Status:Active» Fixed

This happens when you do not set a callback at your Twitter application at http://dev.twitter.com.

Check http://drupal.org/node/1346824#create-app for further details.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Version:7.x-5.4» 7.x-5.6
Component:Twitter Signin» Twitter API
Category:bug» support
Status:Closed (fixed)» Active

Hello guys.
My scenario:
I try to connect authenticated twitter account. I approve application, and then i am redirected to my site where i receive message "Invalid Twitter OAuth request".
In dblog i have this error:

exception 'TwitterException' with message 'Unauthorized' in /home/www...

I started receiving this message today. Before today, everything was working fine.
I have set callback url on my twitter application, keys are also set.
Any suggestions?

Thanks

There is a change on the twitter api

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

StatusFileSize
new1.49 KB

Hi. I created a patch based on the API change about passing oauth_verifier to to oauth/access_token. Check it out.

Status:Active» Needs review

I had the same issue on a development website. After applied #5 patch worked flawless but patch wasn't automated tested yet.

Status:Needs review» Active

The patch in #5 solved the problem for me, thanks.

Status:Active» Reviewed & tested by the community

I was receiving the same error message, and #5 did the trick. Thanks!

the patch in # 5 really works!, been having this problem since i updated the twitter module yesterday, nice work

The patch in #5 worked for me as well.

Worked for me. Will the module be updated with these changes, or something that won't require these changes?

+1 on this working. The module is useless without it, works perfectly with it.

The patch on comment #5 works, please commit it to the repository.

Thanks.

+1 for the patch in #5

Another +1 for #5 - please can we get it rolled into an official release.

One more +1 on the patch in #5 - worked great for me.

+1 for #5 - invalid oauth request before, worked fine after application of patch.

Same here patch #5 solved everything!

+1 for path #5

+1 for #5. Saved me a lot of head-desking today!

Status:Reviewed & tested by the community» Fixed

Committed.

Thanks everyone for all the feedback given!

Status:Fixed» Reviewed & tested by the community

Hey @juampy, thanks for the speedy committing, but this issue is against the 7.x-5.6 branch of Twitter. You committed against 7.x-6.x.
Whilst this will be helpful in the future, version 6 is still in alpha release and it would be helpful if you could also commit against the current recommended release to fix this issue.

Is that doable?

Status:Reviewed & tested by the community» Fixed

Committed to 7.x-5.x. Thanks for spotting that @yanniboi.

http://drupalcode.org/project/twitter.git/commit/2799223

Priority:Major» Normal
Status:Fixed» Active

Thanks for the patch @botanic_spark!

@juampy, the 7.x-5.x download still doesn't seem to have the patch applied to it. In fact, line 77 of twitter.lib.php seems to have diff output in it....

patch #5 worked perfectly, many thanks!

I was having the same problem and patch #5 worked perfect for me cheers!

Glad i could help :)

Status:Active» Fixed

@yanniboi, I just downloaded the dev release and looks fine. Could you have another look please?

@juampy, can you also apply the patch to 6.x-5.x branch? thanks.

I have had another look:

Branch 7.x-5.x
The patch seems to have applied fine. No problem I can find here.

@juampy, the 7.x-5.x download still doesn't seem to have the patch applied to it. In fact, line 77 of twitter.lib.php seems to have diff output in it....

Are you maybe looking at the 7.x-5.6 branch? Line 77 is an issue on 7.x-5.6 but in 7.x-5.x line 77 is the top of the docblock..

Either way, one of the reasons this patch is quite important is because it fixes a typing error in twitter.lib.php since December.
When the twitter.lib.php file was added back into twitter module in #1853794: Please consider restoring twitter.lib.php to the Twitter module the following line snuck in:

-    $url = variable_get('twitter_api', TWITTER_API) . '/oauth/access_token';

This is fixed by the patch #5, but the error is still in the current release 7.x-5.6. It might be an idea to publish a new release with the to get rid of it.

Yes, my bad -- it was a typo and I meant 7.x-5.6. It would be good to get this fixed in the current release.

I understood #5 also works for drupal 6.
I am using twitter 6.x-5.0 and OAuth 6.x-3.0-beta4
How to apply this patch? what to do with the code? add it somewhere in the twitter.lib.php?
Where to add and also remove other lines?

thanks for helping.

Hey @roesch,

The issue queue is not really the best place to give training for patching. There is a lot of Drupal documentation on how to apply patches:

http://drupal.org/patch/apply

Good luck!

@roesch: If you're having trouble figuring out how to do patching, I think you can download a copy of the 7.x-5.x-dev version of the Twitter module and then copy over the twitter.lib.php file into your 6.x module directory, and it should work. It would be better, though, if you learned to apply the patch the correct way, as yanniboi suggested. :-)

thanks, i will try the official way .
drupal is new to me, so have to learn a lot.

@roesch: Here's the exact command that you should use to apply the patch:

git apply -v twitter_oauth_verifier-1924478-5.patch

Version:7.x-5.6» 6.x-5.x-dev
Status:Fixed» Reviewed & tested by the community

@juampy: This patch still needs to be applied against the 6.x-5.x-dev version of the module, so I'm updating the ticket accordingly. You can apply the same patch from #5 against the 6.x-5.x branch. It has already been tested and confirmed to work in 6.x-5.x in this separate issue ticket:

http://drupal.org/node/1962346

I think you can discount the comments posted there by user luisgrisolia. He was probably using an incorrect patch command. I've tried applying the patch twice, and it worked for me both times and has also worked for another user. I'm therefore marking this as "reviewed and tested by the community" so you can go ahead and apply it.

Status:Reviewed & tested by the community» Fixed

Committed to 6.x-5.x and released 6.x-5.1.

http://drupalcode.org/project/twitter.git/commit/1a7ae4a

Thanks!

Thanks for helping.
It works!
I applied the mentioned patch to Twitter 6.x-5.x-dev.
And the Twitter stream at our company page is up to date for the first time in weeks! yeehoo!

Great Job Buddy (#5)...............

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.