Facebook的身份验证重定向循环

Using Facebook's example code: https://developers.facebook.com/docs/authentication/ and FB_ignited for CodeIgniter: https://bitbucket.org/deth4uall/facebook-ignited I get an infuriating redirection loop after authentication.

Has anyone come across this before?

In the end I used a static file to handle the Facebook call back like so:

<?php

/*
    Callback redirect to get around CodeIgniters odd clean url analness
*/

$domain = $_SERVER['SERVER_NAME'];
$controller = $_GET['controller'];
$code = $_SERVER['QUERY_STRING'];
header("Location: http://$domain/$controller?$code");

I had a facebook auth / session / post & get variable problem. And you might be experiencing the same one. Use header ('P3P: CP="CAO PSA OUR"'); at the top of your html output.