I have spent the better part of a day trying to configure this module. Why is this so complicate? And why can't you write a simple help doc to explain what it takes to install this module?

1) Install Twitter module (6.x-3.0-beta3)
2) Install OAuth module (6.x-2.02)
3) Set OAuth config to RSA-SHA1
4) Add Twitter App on Twitter site
5) Get OAUTH CONSUMER KEY and OAUTH CONSUMER SECRET from new Twitter app on Twitter site
6) Add key and secret to Twitter module config
7) Choose node types to post from
8) On your user account page, click Edit > Twitter Accounts and then the Add Account button
I get an error here from Twitter saying that the credentials are invalid.

Someone please help here. It shouldn't take this many hours to figure out how to set up a module

Thank you

Comments

tonyhrx’s picture

Well. I see your point.

This module has problems, the least being it 23 weeks since the last commit. Twitter has moved on since then.

This module used to allow you to set up your site as having a global twitter account - ie all posts go to one Twitter account - or individual users could set their own account.

Not anymore I think.

I don't have trouble setting up the Twitter account on user id 1. In fact it automatically creates it for me from the Twitter app.

-Mania-’s picture

I've followed the steps mentioned on first post but can't get this to work either. Using latest 6.x-3.0-beta4 and with user id 1. Step 8) doesn't produce errors but does not seem to be doing anything either as no accounts show up. Any help?

michaek’s picture

I don't mean to be snide, but you're using a beta release of community-maintained software. That doesn't mean you should expect failure, but that you should perhaps lighten up on the disbelief and condescension.

The only issue I'm aware of that could get in the way is that apps created on Twitter at twitter.com don't work correctly, and those created at dev.twitter.com do. Otherwise, I would need more information to be able to help you troubleshoot.

-Mania-’s picture

Who are you addressing michaek? I've simply reported that the functionality this module is trying to accomplish does not work for me. Perhaps this is because I can't seem to follow the convoluted steps correctly but there are others asking help too so I'm not alone on this.

michaek’s picture

Hi, @-Mania-.

I thought I was addressing you, but it turns out the original issue is by @R-H. The "Revision 1 by -Mania- on August 10, 2011 at 10:55pm" line that now shows up when people comment on issues threw me off, and I apologize for being curt.

Did you set up your app on dev.twitter.com? If so, that's not the problem, and I'll see what I can do to help. :)

Sizzly’s picture

Michaek is right! If you obtained your API keys from https://twitter.com/apps/new it doesn't work.

Zip on over to http://dev.twitter.com and you'll be all set. Just pulled it off now.

Thanks, Michaek.

michaek’s picture

Credit shouldn't do to me, but to @pixel8r in #1164568: Posting problems? Link on settings page to twitter is wrong..

Maybe I'll reformat the module description to emphasize the link to that issue, as it seems to be something people come up against repeatedly.

-Mania-’s picture

@ michaek, yea the revision line is rather confusing. Btw. I'm using dev.twitter.com so unfortunately that wasn't the solution for me.

michaek’s picture

Ok - let's figure out what's going on. First, let's give this issue a useful title!

Then:

  1. What hostname are you using for your app?
  2. Have you set the app to have read/write permissions? (This probably doesn't matter, but I seem to remember it fixed some unexpected issues.)
  3. Are there any records in the twitter_account table in your database?
  4. Can you reproduce the error from a fresh Drupal install (without other modules)?

If we don't get anywhere with these issues, we might start inserting some debugging code into the module to see what we're getting back from Twitter.

michaek’s picture

Title: Shoot me in the head, how do you install this module? » Twitter account is not added, but no error appears
Version: 6.x-3.0-beta3 » 6.x-3.0-beta4

Can you answer any of my questions, so we can help figure out what's going on?

-Mania-’s picture

Sorry, been busy.

1. Do you mean my site URL? It's a local development site, won't put the twitter live because it's not working.
2. Yes, "Read, write, and direct messages"
3. Not that I can see. In fact I couldn't even find the twitter_account table?
4. I'll see if I can find time for this. I'm using Postgresql, I'm not sure if all the problems are because of it. This is what I get in my error log after the last step of trying to create an account (step 8 on the first post):

pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: relation &quot;twitter&quot; does not exist in /var/vhost/drupal/drupal-6.9/includes/database.pgsql.inc on line 139.

query: SELECT COUNT(*) FROM (SELECT twitter.twitter_id AS twitter_id FROM twitter twitter LEFT JOIN twitter_account twitter_account ON twitter.screen_name = twitter_account.screen_name LEFT JOIN users users ON twitter_account.uid = users.uid WHERE (twitter_account.protected = 0) AND (users.uid = 1) ) count_alias in /home/staff/xxx/vhost/www.xxx.com/modules/views/includes/view.inc on line 745
michaek’s picture

Hi, @-Mania-. Thanks for the feedback.

1. The reason I ask is that local domains won't work with Twitter auth.
3. That's good to know!
4. I think Postgres probably explains it. I believe the schema setup for this module uses a field setting that's not available in Postgres. For shame!

Line 532 of twitter.install specifies "'unsigned' => TRUE". I'm not convinced of the value of this setting - I think it reduces the size allocated for the field by half, but that's not compelling for me if it makes the module unusable for a widely used database!

michaek’s picture

It seems the fix in #426334: Unable to install module for postgresql database was to remove the length for integer fields, not the unsigned setting.

However, that may be because, as described in #60871: Use CHECK constraint to enforce UNSIGNED in PostgreSQL comment #9, the way unsigned is faked for Postgres (using CHECK constaints) means that the usable size of the column in Postgres is actually only half of the length specified - which becomes a problem for our very long tweet ids!

But the problem seems to happen for you on the schema creation. I don't really want to go through the process of setting up a Postgres database for testing, but that might be necessary to get to the bottom of exactly why this isn't working for you. (I'm actually surprised that you don't have a lot of other DB problems with Drupal - I wouldn't have expected there was a lot of testing for contributed modules with Postgres.)

-Mania-’s picture

> I'm actually surprised that you don't have a lot of other DB problems with Drupal - I wouldn't have expected there was a lot of testing for contributed modules with Postgres.

Most work okay but there's definitely been a number of cases (usually with smaller contributed modules) where Postgres caused errors. It's not my call to use Postgres as it was chosen by my company many years back but we are on our way to MySQL soon. I appreciate your help on this michaek.

juampynr’s picture

Assigned: Unassigned » juampynr
Status: Active » Closed (duplicate)

Bugs related to adding a Twitter account to a user account were fixed at #1192138: Error when adding/associating a Twitter account to a site account.

Please upgrade to the latest beta release at http://drupal.org/project/twitter.

Cheers