Hi,

I ran across a problem that can completely prevent the module from correctly authenticating with Twitter. No Tweets are being loaded as a result.

  1. After enabling the Module and setting correct values for OAuth-access, go to admin/config/services/twitter and add an authenticated account.
  2. Add an unauthenticated account that has a lower twitter_uid than the authenticated one (I'm guessing that's what causes the problem)
  3. Pulling tweets will not work for any accounts now.

The reason for this lies in twitter.inc within the function twitter_connect:

// Load the first authenticated account.
$twitter_uid = db_query("SELECT twitter_uid
                         FROM {twitter_account}
                         WHERE oauth_token <> ''
                           AND oauth_token_secret <> '' ")->fetchField();

The query looks for oauth_tokes that are not empty strings, but the database fields are NULL by default and so it fetches the first twitter account from the database, whether it is authenticated or not.

A quick fix for users experiencing this problem is to set the database values to empty strings for your unauthorized users, which is what I did for now.

Comments

edanxfeiles’s picture

Issue summary: View changes

The same for me and also in 6.5x.
maybe needed to add an option to select the account you want to be used on cron run.

minneapolisdan’s picture

Just ran across this (or think I did). Guess there's no fix other than the database change suggested above?

damienmckenna’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
Status: Active » Needs review
StatusFileSize
new730 bytes

This patch should fix the issue for the 7.x-5.x branch.

damienmckenna’s picture

Version: 7.x-5.x-dev » 6.x-5.x-dev
StatusFileSize
new699 bytes

This should fix it for the 6.x-5.x branch.

damienmckenna’s picture

The problem only affects the 7.x-5.x and 6.x-5.x branches.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 40e8a88 on 6.x-5.x
    Issue #2084729 by DamienMcKenna: twitter_connect() shouldn't list non-...

  • DamienMcKenna committed a91ccad on
    Issue #2084729 by DamienMcKenna: twitter_connect() shouldn't list non-...

Status: Fixed » Closed (fixed)

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