Using Facebook's example code: https://dev开发者_如何学Celopers.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?
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.
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");
精彩评论