Drupal 6.19
Twitter 6.x-3.0-beta3
Oauth 6.x-2.02
FreeBSD 7.x

Even with a freshly installed Drupal setup I have this problem.

I do the following:
- unpack twitter module to 'sites/all/modules/'
- unpack oauth module to 'sites/all/modules/'
- activate modules: Oauth, Twitter, Twitter actions, Twitter Post, Twitter Signin
- Go to 'user/1/edit/twitter' and enter Twitter account name (not password, since account is not protected) and click 'Add account'
- Resulting page after the submission is blank

Comments

jpamental’s picture

It might be as simple as your callback URL specified in your Twitter app not being set right. Did you go through the process of getting an API key from twitter? It's quick, free and easy (and necessary) for setup. You need to make sure that you specifiy http://yourdomain.com/twitter/oauth as the callback URL to redirect the user back to when they sign in or it won't complete the connection between the Twitter account details and the user account.

Hope that helps!

Jason

frysco’s picture

I thought setting up the Oauth stuff was only necessary if the Twitter feed that I intended to access was 'protected', and required logging into a Twitter account to view.

Since the Twitter account I was trying to set up is not protected, I had not set that up.

However, at your suggestion, I did register for an API Key and plugged in the 'Consumer key' and 'Consumer secret' into the relevant sections.

But, when I am returned back to my site after being directed to Twitter to 'Allow' my 'application' access, (via the http:///twitter/oauth?oauth_token=) , I get the same problem as before : a blank browser window.

jpamental’s picture

Did you make sure to set the callback URL in your application setup on twitter to go back to http://yourdomain.com/twitter/oauth ? Without that it's not going to actually sign you in and can lead to problems like this.

The reason you have to go through the API key process is because Twitter now requires it for posting to any Twitter account, protected or not.

Hope that helps-

Jason

frysco’s picture

Yes, I made sure that the callback URL was correct. That's what I intended to say in my post above, but didn't notice that the < and > tags got stripped.

What I intended to say above was this:

But, when I am returned back to my site after being directed to Twitter to 'Allow' my 'application' access, (via the http://<site domain>/twitter/oauth?oauth_token=<token>) , I get the same problem as before : a blank browser window.

Note I am not trying to post at this point, but trying to read from a Twitter account that is not protected.

botris’s picture

I had the same problemen, just want to read from twitter not post.
Got white screens...
installed 6.x-2.6 and everything works out of the box

finedesign’s picture

Same problem.

fnikola’s picture

I had the same behavior with the latest version and when i uninstalled 6.x-3.0-beta3 completely and installed 6.x-2.6 as indicated by Boriss in #5 it worked fine with no passwords on the twitter accounts.

danny englander’s picture

Confirmed #5 worked for me but I needed to go into PHPMyadmin after deactivating 3.0 and delete twitter related stuff from having had 3.0 installed. All I wanted was a simple twitter feed of an unprotected twitter account.

finedesign’s picture

I can confirm #5 worked for me too. Thanks for the feedback, folks.

However, I cannot actually view the blocks anywhere on the site. I activate them and nothing shows. Could this be because I'm on a local dev environment (localhost) and my Twitter API key is connected with another domain?

Also, is it possible to restrict the Twitter feed from showing replies? I'd only want normal Tweets to go out.

c-c-m’s picture

Subscribe: I haven't been able to use 6.x-3.0 beta3 with Oauth 6.2 or 6.x-3.
Worked fine as described in #5

librarywebchic’s picture

I have this same problem. When I tried to add the appropriate callback URL into my Twitter API key it won't let me. My Drupal install lives in a subdirectory of my domain. Will this module work at all if that is how my site is setup?

decto’s picture

My drupal installation resides in a subdirectory ( http://domain/dir/ ). I had the same problem trying to add the callback URL until I added a trailing slash to the URL ( http://domain/dir/twitter/oauth/ ) .

Unfortunately this only fixes the applications' registration. When later I try to add a twitter account to a user, and Accept the application to access my feed, I get redirected to a blank page.

danny englander’s picture

I am still having this issue with the 6.x dev version from 2011-Feb-25

The error I get is:
Fatal error: Call to a member function set_auth() on a non-object in [path-to-site]/sites/all/modules/twitter/twitter.pages.inc on line 312

Should I open a new issue with the version I am using?

dboulet’s picture

Version: 6.x-3.0-beta3 » 6.x-3.x-dev

highrockmedia, that seems to be the issue here. It looks like the form does not work correctly without a password—the set_auth() method is called on an object that does not exist if no password was entered. This will result in the error message you see, or a blank screen for people who have php errors turned off.

michaek’s picture

Status: Active » Closed (fixed)

There are instructions for how to go through the process of setting up OAuth here: http://fatedtoend.com/content/how-get-drupal-post-updates-twitter-again-... (though clearly the #955474: Poor interface instructions for OAuth should be remedied)

If you don't need to post to Twitter, see #1133722: Showing tweets without authentication.

Jelmer85’s picture

I'm having this problem as well (and I need to post to twitter).

Any solution yet on how to avoid this blank screen?

I have followed http://drupal.org/node/649714

edit:
btw, which version of Oauth should I use with twitter 6.x-5.0?
In the docs it says oauth 3.0, but here it says oauth 2.02, but then I get an error that I am missing oauth_commons....

Please help! :)