Home Programming Facebook platform Facebook IFrame and Ajax require_login()

Facebook IFrame and Ajax require_login()

E-mail Print
Share/Save/Bookmark
Another day another bug (or just weird behavior) in Facebook platform.

When calling $facebook->require_login() from anywhere else then a canvas page it is caught in an endless loop.

I was going crazy over this for few days. The big problem was that conditions under which this error occurs distinguish between IE and FireFox.


In short ... the solution is ... you have to carry Facebook signature variables (stored in $_GET) with you all the time.




$fbsig_vars = "";
$i=0;
foreach($_GET as $key => $value) {
if (strpos($key,"fb_sig")!==false) {
if ($i!=0) $fbsig_vars.= "&";
$fbsig_vars.= "$key=$value";
$i=1;
}
}


Hits: 1317
Comments (0)Add Comment

Write comment

busy
Last Updated ( Monday, 15 February 2010 11:29 )  

Sponsored Links

My friends

Bookingpoint
partner websites

Donate

Do you find content useful? Please donate so I can cover my hosting expenses! Thanks!