First of all, big thanks to Dave for this module.

I've managed to get the DFF - Facebook Connect working. The login button does work and the user gets logged in with Facebook credentials.

However, the Drupal user doesn't see/know that he/she has been logged in because the login button doesn't change (the page doesn't refresh). So despite being logged in, the user still sees the "Connect" button.

When I hit refresh, the "Connect" button changes to "Log out" but only after I manually refresh the page (F5).

I'm wondering if this is something related to my Drupal configuration or if this is and issue with the module.

Thank you in advance for any tips.

CommentFileSizeAuthor
connect_logged_in.png70.65 KBvasheck
connect_logged_out.png58.17 KBvasheck

Comments

Dave Cohen’s picture

Are you using the login block provided by fb_connect.module?

It should be refreshing the page when the status changes.

vasheck’s picture

Thank you Dave for your reply.

I followed the instructions here: http://drupal.org/node/195035

Yes, I do use the FB login block. Here are my block settings:

*******************
Anonymous user, not connected

Facebook users login here. <fb:login-button onclick='FB_Connect.login_onclick();'></fb:login-button>

Registered user, not connected

Link your account with Facebook. <fb:login-button onclick='FB_Connect.login_onclick();'></fb:login-button>

Connected User

<fb:profile-pic uid=!fbu></fb:profile-pic><fb:login-button onclick='FB_Connect.logout_onclick();' autologoutlink=true></fb:login-button>

Input format
- Filtered HTML

User specific visibility settings
- Users cannot control whether or not they see this block.

Role specific visibility settings
- none selected (show to all)

Page specific visibility settings
- Show on every page except the listed pages. (none listed)

*******************

I re-tested the login again and the issue seems to persist. I do get logged in but I must hit refresh (f5) in order to see the Log out button.

Thanks!

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

Make sure you're using the latest version of modules/fb.

Then edit modules/fb/fb_connect.js. Change FB_Connect.statusHandle() so the first line is something like:
alert("In FB_Connect.statusHandle! data.changed is " + data.changed);

Maybe uncomment the alert in FB_Connect.on_connected(), too.

Enable firebug if available and see if it shows you any errors when you visit the site.

Do those alerts fire? What is data.changed? And what if anything does firebug report?

RasputinJones’s picture

Status: Postponed (maintainer needs more info) » Active

Reactivating.

I actually have a similar problem Dave. Tried the suggestion you made here and didn't see any alerts.

RasputinJones’s picture

What's particularly interesting about this bug as well is the fact that I have to click the logout button twice to fully log off my test site.

Dave Cohen’s picture

Try flushing caches, then refresh in browser to make sure you get your javascript changes.

Probably you have to click logout just onece, then refresh. I suspect the logout works but the refresh is not.

msti’s picture

hi Dave!
I have the same problem. I press the FB connect button, the FB connect changes to the user's photo, but the user is not logged in.
If I manually reload the page, drupal also reloads the page and the user logs in.

I tried adding 'alert' but i did not see anything. I deleted the fb_connect.js file and there was no change in behavior. Is this normal?
Firebug show no errors.
Any ideas?

Dave Cohen’s picture

The default behavior is to reload the page. Actually its a little more complicated... it makes an ajax call to the server intended to "hand-off" the session. Then, it reloads.

Try testing with firebug enabled. If there are any javascript errors on your page it can prevent the whole thing from working.

RasputinJones’s picture

Following up on this. The latest update to Drupal for Facebook 3.x works pretty well for me.

Dave Cohen’s picture

Status: Active » Fixed

Trying to clean up the issue queue. If this is still a problem, re-open the issue.

Status: Fixed » Closed (fixed)

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

gallamine’s picture

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

I have this problem too. Using firebug in FF 3.6.12 I get the following sequence. The three errors are all in:
http://connect.facebook.net/en_US/all.js?_=1290809787001
getLoginStatus() function

Page load:

JSON.parse error on Line 9

When I click on "FB Connect" I get:

Error on Line 18 

Permission denied for <http://test.robotbox.net> to get property Window.tagName from <http://ssl.facebook.com>.

The login window pops up and I log in. Then I get the next error:


Line 14

Permission denied for <http://test.robotbox.net> to get property Window.className from <http://static.ak.fbcdn.net>.

I can provide the code at each of those lines if you'd like. They are very lengthy.

mayur.pimple’s picture

FB.getSession is not a function
www.xyz.com/sites/all/modules/fb/fb.js?o
Line 320

mayur.pimple’s picture

I have face same problem. after login user need to refresh page.
what is solution.
Thanks

Dave Cohen’s picture

Don't post to closed issues. Open a new one if necessary.