What goes on after fb_connect_login_onclick(); ?

Kaory - September 12, 2009 - 23:41
Project:Drupal for Facebook
Version:6.x-2.x-dev
Component:Facebook Connect
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I've installed the latest dev version on a clean drupal install and the fbconnect works quite well.
Still when I get to use it on a website with quite a number of modifications of the theme, some functions and more, I get the following situation.

Clicking on the connect button makes the facebook connect pop up appear. I enter my login and password and hit connect. Then, instead of disappearing, the pop up opens the following url :

http://www.example.com/fb_cb/5/?session={%22session_key%22%3A%22e480c8ac8f4b43069a8def6b-513925298%22%2C%22uid%22%3A%22513925298%22%2C%22expires%22%3A0%2C%22secret%22%3A%226b43b53e78e4075eb3ca026addf45723%22%2C%22sig%22%3A%226dfcfa9b26ceea6eed33806b57cfd3c6%22}&next=http%3A%2F%2Fwww.example.com%2F%3Ffbc_channel%3D1%26fb_login%26fname%3D_opener%26guid%3D0.3515744674996589

with no scrollbar ... and I'm not even logged in on the website though I am on Facebook.

Therefore I tried to follow the different actions by starting from fb_connect_login_onclick(); ... which turns out to be empty. So here comes my question: what does DFF or Drupal do once I click on that connect button ?

Thanks by advance for any help and for all that hard work.

#1

Kaory - September 13, 2009 - 09:16
Priority:normal» critical

"I've installed the latest dev version on a clean drupal install and the fbconnect works quite well."

Just to precise that by this, I meant that it often does the same bad trick on Firefox 3, even on the Drupal clean install ... By the way, both of the Drupal installs (clean and modified) are from the 6.11 version if that might help.

#2

Dave Cohen - September 30, 2009 - 14:38

Most of what happens is in javascript provided by facebook. Since it works on a clean install, but not after you've enabled other modules, I'd look for problems in the javascript the other modules add to the page.

Or any modules that might tweak the login process, like logintoboggan is reported to cause problems with DFF.

#3

Kaory - October 9, 2009 - 03:37

Thanks for your answer.

I'm still having trouble in order to find facebook js script which follows that request.
Is it in a specific file ? or is it inside the drupal functions ?

Seems like it's my personal theme which is causing the problem rather than some module. Any idea ?

Thanks by advance for any help.

#4

Dave Cohen - October 10, 2009 - 00:49

First, some of facebook's javascript is embedded in the page. This displays the login button.

When clicked, the login form appears in a popup, and credentials are submitted to facebook.

Then facebook instructs the browser to post some data to something called the cross domain receiver. This is post which DFF handles, by returning a simple page which includes more facebook javascript. This is the magic piece that let's facebook do whatever it wants. For example settings cookies and who know's what else.

Maybe you're having trouble finding that because it occurs in a separate request. There's really no limit to how much javascript facebook may be executing, once you've enabled facebook connect.

 
 

Drupal is a registered trademark of Dries Buytaert.