The module is working nicely for me as main admin user, but other authorised users are getting an error when they post a blog to the site. They have set up their Twitter accounts on their Drupal user profile, complete with passwords. But when they post a blog, they're getting the following message:

An error ocurred when posting to twitter: 401 Unauthorised

I've checked permissions, and they should all be fine.

When I go in as admin and re-save the blog entries, they successfully post to the global Twitter account, but not to the individual users' Twitter accounts.

Any ideas?

Comments

ianreeves’s picture

In fact I can clarify exactly when this 401 error message is occurring. It's when an authorised user has added their own Twitter account details to their user profile.
When they haven't added their own Twitter account, the system posts to the global account without problem.
As soon as they add their own account, they get the 401 Unauthorised message when they post - and no tweet is sent either to the global account or to their own account.
The Tweets from their own account are importing into Drupal, though.

radj’s picture

I am also experiencing this problem.

sillygwailo’s picture

Category: support » bug

Take a look at the issue at http://drupal.org/node/356379, esp. my patch at http://drupal.org/node/356379#comment-2188398 I think I had the same problem as this, and the patch there addresses that issue (in my case, for users with multiple Twitter accounts associated with their Drupal account, but the logic should work with only one account associated too).

mcurry’s picture

*subscribe*

kvit’s picture

subscribe

Ken Knowles’s picture

I would get this error when I changed the author.

jwjoshuawalker’s picture

I also experienced this issue when users tried to add content that posted to twitter.

My fix was changing:

$data = 'status='. urlencode($text);

TO

$data = '&status='. urlencode($text);

in twitter.inc on line 136

baxterjones’s picture

i also added that & (ampersand) and nothing changed.. permissions still denied 401

superfedya’s picture

same problem since yesterday :(

reganjcunliffe’s picture

Same problem here. API change recently perhaps?

edalcin’s picture

I've changed the "Alternate API URL:" to "https://twitter.com" and works for me.

tajabosc’s picture

Solution at #11 doesn't work for me.

Even if message says "Successfully posted to Twitter" , the tweet is not published on twitter.com

sillygwailo’s picture

michaelp6of7’s picture

#11 tip, Alternate API URL: to https://twitter.com fixed my problem.

UPDATE: no, actually it still doesn't work but the Twitter module says it posted. Twitter never receives the information and does not get published.

avpaderno’s picture

I have marked #609576: 401 Unauthorized - without triggers as duplicate of this report.

superfedya’s picture

to import your nodes to Twitter use http://twitterfeed.com
This service will transfer your nodes from RSS to twitter and it's work great!

mawosch’s picture

Same 401 Problem

- subscribe -

Marko B’s picture

Ok so if OAuth is required then this post to twitter doesnt work. Tried with dev version but no luck also? whats status/plan for this?

quasiheros’s picture

Same problem here...

subscribe

Marko B’s picture

Here you go for temporary solution

http://drupal.org/node/404470#comment-3456224

go to #106

josepvalls’s picture

Priority: Normal » Major

+1

My I change the priority to major?
Maybe it should be a task to write oAuth compatibility?

ndenhild’s picture

Status: Active » Closed (duplicate)

#20 does the trick! Works great on my three sites so... Thanks.

avpaderno’s picture

Status: Closed (duplicate) » Active
steinmb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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