Users with multiple twitter accounts, other than uid 1, cannot tweet.

harouni - September 21, 2008 - 18:28
Project:Twitter
Version:6.x-2.x-dev
Component:User interface
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

Hi peeps

"Twitter authentication failed. Please check your account name and try again."

I get the above error when trying to add my twitter account (Username and Password) to the "My accounts" section this module creates.
I'm sure that I'm using the right username and password, honest I am :)

Any ideas on what's happening here?

#1

rogermugs - October 17, 2008 - 13:57

I'm having the same issue after two days of it working just fine on my site... no explanation... i've uninstalled and re-installed the module several times and tried different usernames... same problem.

help?

#2

binomsc - December 12, 2008 - 13:42
Category:support request» bug report
Priority:normal» critical

Same here, installed the module, gave permissions etc. but get the same error message :-(

#3

Josh Waihi - March 15, 2009 - 23:22

you should check you have the right URL, twitter.com is generally fine, however I use a twitter clone that requires the url has a '/api' on the end.

#4

BWPanda - April 1, 2009 - 04:47

Also know that usernames are currently case-sensitive: #349639: Twitter screen names are case sensitive
Hoping to fix that though...

#5

liza - July 28, 2009 - 00:45

same problem here and am doing everything right : user, password, case-sensitive whatever. any ideas why is this happening?

#6

liza - July 28, 2009 - 00:58

btw, this is happening to me from within the ACTIONS twitter config panel :( as well as the USER account. am trying to figure what's going on because even though the system took the user/pwrd globally and even though it says that it successfully posted to twitter NOTHING appears on my twitter account :(

#7

Josh Waihi - July 28, 2009 - 11:59

liza, you may need to run cron to import twitter feeds

#8

liza - July 29, 2009 - 19:39

the issue is not the importing of twitter posts (am managing that via Activity Stream); the issue is that where i have to add user name and password to make the system post to twitter it is saying that the UserName/Password combo is not being autheticated by Twitter. am wondering if this is something to do with the changes in the Twitter API.

#9

asb - August 3, 2009 - 13:04

Same error here: n error occurred when posting to twitter: 401 Unauthorized.

Twitter account and credentials are working when directly logging in on twitter.com or posting tweets through TwitterFox.

If I enter a password into ./admin/settings/twitter and save the admin page, the field "Password:" remains empty (no dots or asterisks like *****), I don't know is this is supposed to not give feedback.

Looging into the database, this looks pretty messy:

mysql> select * from twitter_user;
+-----+-------------+------------+--------+
| uid | screen_name | password   | import |
+-----+-------------+------------+--------+
|   0 | exxxxx     | NULL       |      1 |
|   4 | exxxxx     | xxxxxxxxxx |      1 |
|   3 | exxxxx     |            |      1 |
+-----+-------------+------------+--------+
3 rows in set (0.00 sec)

Three different uids have the same screen name, one of them has the password "NULL", one the password the userer actually entered, and one an empty password. Somehow this seem to be individual user's entries which have entered the same twitter account; some of the passwords seem to have made it into the database (the passwords are stored unencrypted!), others seem to not have been saved. Since the password is not encrypted, you can edit it directly into the database table, at least this worked for me (don't forget the backup!)

Whatever you enter on the ./admin/settings/twitter page seems to not being registered into the database, at least not into the "twitter_user" table; the "twitter_account" table has no row for passwords...

Greetings, -asb

#10

liza - August 5, 2009 - 12:46

look at asb's explanation. it's the same for me.

#11

2noame - August 14, 2009 - 05:51

Same problem for me. Subscribing.

#12

aaronbauman - August 17, 2009 - 14:06
Title:Twitter authentication failed. Please check your account name and try again.» Users with multiple accounts, other than uid 1, cannot tweet.
Status:active» needs review

Here's the issue, from twitter.inc in twitter_form:

      $form['account'] = array(
        '#type' => 'select',
        '#title' => t('Account'),
        '#options' => $twitter_accounts,
        '#access' => user_access(''),
        '#id' => 'twitter-account',
      )

note line 42:
        '#access' => user_access(''),

The problem is all users other than uid = 1 won't have access to the 'account' dropdown.
During nodeapi, this is where the twitter account comes from, and it's empty.
You're getting 401'ed because you're trying to authenticate without credentials.

What worked for me is removing line 42 (attached patch), making the account dropdown appear.
This allows users who have access to more than one twitter account, other than uid = 1, to tweet.

AttachmentSize
311460-twitter.inc_.patch 416 bytes

#13

aaronbauman - August 17, 2009 - 14:06
Title:Users with multiple accounts, other than uid 1, cannot tweet.» Users with multiple twitter accounts, other than uid 1, cannot tweet.

#14

steinmb - August 24, 2009 - 02:32

Confirming that patch #12 fixes the problem. Allowing me to choose Twitter account from the pull down menu.

#15

joshmccormack - November 6, 2009 - 15:23

I had this problem, and the solution was more in using the module properly than patching or changing anything.
I had thought I needed to update my password in the module admin screen. Actually, I need to fix it from my profile. Be sure to validate that your Twitter account into in your profile is accurate.

 
 

Drupal is a registered trademark of Dries Buytaert.