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.
- After enabling the Module and setting correct values for OAuth-access, go to admin/config/services/twitter and add an authenticated account.
- Add an unauthenticated account that has a lower twitter_uid than the authenticated one (I'm guessing that's what causes the problem)
- 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
Comment #1
edanxfeiles commentedThe 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.
Comment #2
minneapolisdan commentedJust ran across this (or think I did). Guess there's no fix other than the database change suggested above?
Comment #3
damienmckennaThis patch should fix the issue for the 7.x-5.x branch.
Comment #4
damienmckennaThis should fix it for the 6.x-5.x branch.
Comment #5
damienmckennaThe problem only affects the 7.x-5.x and 6.x-5.x branches.
Comment #6
damienmckennaCommitted.