I am set up on my localhost.
Can anyone help me with these settings?

Redirect Loop
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

http://localhost/beta/fb_cb/10770/fb_cb/10770/fb_cb/10770/fb_cb/10770/fb...{%22session_key%22%3A%223.gsRyKrAuW_dmx_CVSFuhYg__.3600.1234641600-509326453%22%2C%22uid%22%3A%22509326453%22%2C%22expires%22%3A1234641600%2C%22secret%22%3A%22bDP2dgb9tbexLuTCmaue6A__%22%2C%22sig%22%3A%22f430e4a8488982334e0e7c0a5a1a230a%22}

Chris

Comments

pribeh’s picture

I'm getting the same issue here not on local host but online test site. If I'm logged into facebook and try to use facebook connect after clicking connect in the dialog I get the redirect screen.

Dave Cohen’s picture

Status: Active » Fixed

From the README.txt...

- This patch is required for Drupal 5.x: http://drupal.org/node/241878

#241878: custom_url_rewrite cannot rewrite front page

pribeh’s picture

Hey Dave,

Thanks for responding since this is urgent but I have implemented that patch (and read the readme) if that patch affects common.inc. This is what my commons.inc looks like under "// The special path '' links to the default front page." - which I believe is the affect area of the patch:

  if ($path == '<front>')
   unset($path);
  $path = drupal_get_path_alias($path);
  if (!empty($path)) {
    $path = drupal_urlencode($path);
    if (!$clean_url) { 
if (isset($query)) {
        return $base . $script .'?q='. $path .'&'. $query . $fragment;
      }
      else {
        return $base . $script .'?q='. $path . $fragment;
      }
    }
    else {
      if (isset($query)) {
        return $base . $path .'?'. $query . $fragment;
      }
      else {
        return $base . $path . $fragment;
      }
    }
  }
  else {
    if (isset($query)) {
      return $base . $script .'?'. $query . $fragment;
    }
    else {
      return $base . $fragment;
    }
  }
}
pribeh’s picture

This is weird. I can get the canvas page (with fb default theme) to work but accessing the page via its own domain still gives me the redirect loop after I've attempted to sign in using facebook connect.

Dave Cohen’s picture

Status: Fixed » Active

have you enabled the fb_devel module, set $conf['fb_verbose'] = TRUE; in settings.php and checked your logs? any information there?

pribeh’s picture

Ok, so I now get the following every time I logout of facebook to avoid getting the redirect loop page accessing my site via the same browser:

Warning: Duplicate entry 'fb_connect_3.DcXgRLVGi1gjksEQqPNi5w__.86400.1238781600-142447728' for key 1 query: UPDATE sessions SET sid = 'fb_connect_3.DcXgRLVGi1gjksEQqPNi5w__.86400.1238781600-1424477285' WHERE sid = '8b482466c8a5f9438c13e2e096759e38' in /var/www/thomas/lc3/includes/database.mysql.inc on line 174

And yes, I'm using the above setting in my settings.php

I also got a bunch of other errors that I didn't get a copy of. I will attempt this again and provide any logs I can find.

In my log I get this : "User uid is now 11 (was 0), redirecting to logout to ensure permissions are correct"

pribeh’s picture

I managed to get it to create a user for once amidst all the bugs. The user is known as 14242544@facebook.com. Not sure how that worked or if the username is supposed to come out like that.

Dave Cohen’s picture

Try the patch from http://drupal.org/node/419702, that will solve the duplicate entry. Maybe the two are related.

pribeh’s picture

Works! Thanks. I guess this solves both issues?

Dave Cohen’s picture

Status: Active » Fixed

Let's hope so. I think the session problem made the modules think the user id was changing, and therefore it redirected.

Status: Fixed » Closed (fixed)

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

peronas’s picture

Hey guys, I seem to be running into this problem on a Drupal 5 site I'm trying to add Facebook Connect functionality to. I've read the README.txt from start to end multiple times, applied the above mentioned patch to the common.inc file and still, anytime I try to log in via the FB connect button, the login popup appears, I enter my credentials then after a bit of waiting I get an error in the popup saying the page isn't redirecting properly.

One of the weird things is that the authentication is actually happening, which is apparent because if I refresh the page it now sees me as connected and logged into facebook despite the redirection errors, I'm not sure if this points to an issue with the callback post authentication or what. Also I had temporarily set it to generate a local user account and it was doing this fine as well despite the redirection errors. I've since disabled that in hopes of stripping it down to the very basics of Facebook Connect and getting that working.

I've enabled the devel modules and placed the blocks but not much seems to be coming out of them as far as whats happening in the login popup.

Not sure if it helps but the site is: http://dev2.changents.com/login_join in case you wanted to see exactly what was going on.

I'd be very thankful for any help I could get on resolving this issue! Let me know if any additional info is needed to trouble shoot this!
Thanks in advance for any help!

peronas’s picture

Status: Closed (fixed) » Active
Dave Cohen’s picture

Status: Active » Closed (fixed)

peronas, I invite you to open an new issue, as your problem sounds different from the one reported (and solved) here.

I should warn you that I'm open to patches for the 5.x version,but I don't plan to work on it myself. I recommend 6.x.