The FB Connect login does not appear to work in all browsers. These issues can be seen on drupalforfacebook.org itself. I have tried in the following 3 browsers:

  • Chrome - Works
  • IE 8 - Login button doesn't show, found this blog: http://blog.tmcnet.com/blog/tom-keating/movabletype/movabletype-facebook..., it describes that the xmlns:fb must exist on the HTML element. After putting this on the HTML element in my theme it resolved the IE problems.
  • Firefox 3.5.6 - The button displays and appears to log the user in. However, the profile picture shows next to a "login" button (the not connected version) and then the page is automatically redirected to log the user back off

Does anyone else see these issues?

Comments

ahansen1’s picture

StatusFileSize
new27.57 KB

Upon further investigation of the firefox issue, the browser appears to go through a cycle where it calls on_connected. Then after the page has refreshed the javascript on_not_connected is triggered and since the user actually had been logged in, it now logs them out. See the attached screenshot.

Dave Cohen’s picture

Title: FB Connect Login: Browser Compatability » FB Connect Login odd behavior on firefox
Category: bug » support

The IE stupidity is just IE up to its usual tricks. Not a bug we can fix, and yes everyone must make that change to their theme.

If you can track down exactly what causes your firefox issue I'd love to fix it. But I suspect its on the facebook side and there's nothing we can do. The fbconnect login is a tricky thing, involving cookies set by facebook that we must honor but have no control over, and also loads and loads of javascript. If the javascript is buggy only facebook can fix it.

Try deleting cookies and see if the problem continues. Enable the fb_devel debug block, and post its contents here.

ahansen1’s picture

I know it may be IE just being difficult, but they still have 50% or more of the browser market looking at the stats on my non technical sites. It is good that now it is captured here that the namespace must be added to your theme. But, I wonder if it would also be possible to add something to the module? Maybe if someone enable facebook connect it could analyze the currently enable default theme and spit out a warning if it didn't have the proper thing? Seems like this is something that could save someone a lot of trouble. I know for months now I've just not bothered to try this facebook connect portion of the module thinking it was still a work in progress after seeing all these issues with it on drupalforfacebook.org itself. I think making this oddity that IE creates more in your face and proactively warning users about it there is a better chance for module adoption.

I'll continue to look into the firefox issue. It may be like the IE thing, but given that many large sites (digg.com fb connect on firefox works) are successfully using facebook connect there has to be away this can be made to work. I think firefox even works in the facebook connect module?

I would encourage you to set this back to a "bug report", if nothing else so that people who are thinking of using this module can more easily see the issues with it before doing so.

Dave Cohen’s picture

Category: support » bug

When I can, I add warnings to the fb_devel module. I hope they save people time, but there's only so much I can do. I will add something about the xmlns attribute to the README.txt and doc (I thought it was there already, but apparently not). If you submit a patch that adds a warning about the theme, great I'll commit it. however if someone had that time to kill, I'd rather see a patch to drupal core that allows my module to add that attribute to the page.

If I can reproduce the firefox issue I'll work on it, too.

ahansen1’s picture

Category: bug » feature
Priority: Critical » Normal
StatusFileSize
new23.22 KB

Well, I finally figured out my issues with Firefox. Dave, as you probably already figured it had to do with my environment. The issue is that I have the Web Developer toolbar for firefox and had it set to disable "external site cookies", see screenshot.

I'm not sure there is any way to guard against this and give a meaningful message to the end user that it will not work with external site cookies disabled? My thought was in the on_connected callback we could get the status again to ensure it was actually connected.

FB_Connect.on_connected = function(fbu) {
  //alert("FB_Connect.on_connected " + fbu + " settings fbu is " + Drupal.settings.fb_connect.fbu + " FB_Connect.fbu is " + FB_Connect.fbu);
   FB.Connect.get_status().waitUntilReady(function(status) {
     switch(status) {
     case FB.ConnectState.connected:
        var status = {'changed': false, 'fbu': fbu};
        if ((FB_Connect.fbu === 0 || Drupal.settings.fb_connect.fbu != fbu) &&
                        Drupal.settings.fb_connect.in_iframe != 1) {
                status.changed = true;
        }
        FB_Connect.fbu = fbu;
        $.event.trigger('fb_connect_status', status);
       break;
     case FB.ConnectState.appNotAuthorized:
     case FB.ConnectState.userNotLoggedIn:
          alert('external cookies may be disabled, redirect user to help page');
       break;
     }
   });
}

However, it seems that the state gets pulled from cache and so it doesn't actually perform the test I was hoping. I then tried wrapping the above in a forceSessionRefresh, but as this recent forum thread describes it doesn't seem to be working either.

http://forum.developers.facebook.com/viewtopic.php?pid=187665

Since both of these things now appear to be issues external to the module and can only be resolved by giving the user additional feedback. Moving the categorization to feature request.

Dave Cohen’s picture

Hey thanks for sharing the solution. (I had figured nothing out.)

I'm all for attempting to alert the user of the potential problem, but I think that belongs in fb_devel.module Or more specifically fb_devel.js which does not currently exist but probably should.

I'll put this on the "when I get around to it" list. Thanks for all the detail.

ahansen1’s picture

I was thinking that this is something that should actually go in the module itself vs. a development module. This isn't something that only affects site admins, but could affect end users as well. End users who have these cookies disabled could be given a meaningful message that the facebook connect login was not going to work when they tried vs. making it look like the site doesn't work. I'm sure it is an edge case for folks to have the web developer pluggin with the external site cookies disabled like I did, but I wouldn't be surprised if other privacy or anti virus browser pluggins also block external cookies like that.

If I am able to come up with something, I'll post it back here.

jason ruyle’s picture

Category: feature » bug

Anyone have a solution to this? We have an application where users are taken to a login screen with the connect button. If the user is in IE, it allows them to register. But after they register, it refreshes page, and they are actually logged out of Drupal, but stay logged into Facebook.

We verified that the drupal account is created, some of the js that we see:

<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "fb_canvas": { "fbu": "10000207XXXXXXXXX", "uid": 0, "canvas": "ourname" }, "fb_connect": { "front_url": "/fb_cb/a22b9a2e608c36e16c4afe33ebd43721/", "fbu": "10000207XXXXXXXXX", "uid": 0 }, "fb_devel": { "session_id": "3d4e8b9ba7c480039f30e778a4e53aca", "session_name": "SESSaf4d2f85e4cd0d6e72fd7a8f1d9e54f1" } });
//--><!]]>

Anyone know why this could be happening? We have shared cookie and sessions.

Dave Cohen’s picture

Title: FB Connect Login odd behavior on firefox » FB Connect Login odd behavior when third party cookies disabled
Category: bug » support
Status: Active » Fixed

ahansen1, recently I added the ability to store facebook's session inside Drupal's $_SESSION. In other words rely less on facebook's cookie. So please see if that works for you even when third party cookies disabled. Also see admin >> site building >> facebook apps >> settings where you can disable this feature.

Jason Ruyle, I'm not sure what the problem is, but it sounds like not the same issue. Please submit a new one to track it.

Status: Fixed » Closed (fixed)

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