This problem with fancybox is driving me crazy. When you click the link, the loading icon keeps showing forever and no page is shown. I have tested several things but I have no idea why this happens.
It only happens with a particular kind of page, and it's the one I use to register users with facebook (I use hybridauth internally). They should be asked for authorization in the facebook site, but instead, nothing. But of course, if you open the link normally, without fancybox, it works just fine.
I made a live example of the problem so you can explore it freely. Live test
I really appreciate your help, if you need more info just ask for it. Thank you.
EDIT: Here's the register.php source:
<?php
session_start();
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$config = dirname(__FILE__) . '/hybridauth/hybridauth/Hybrid/config.php';
require_once( "hybridauth/hybridauth/Hybrid/Auth.php" );
try{
$hybridauth = new Hybrid_Auth( $config );
switch($_GET["s"]){
case "facebook":
$facebook = $hybridauth->authenticate( "Facebook" );
$facebook_user_profile = $facebook->getUserProfile();
echo "<pre>";
print_r( $facebook_user_profile );
echo "</pre>";
}
} catch(Exception $e){
// Display the recived error,
// to know more please refer to Exceptions handling section on the userguide
switch( $e->getCode() ){
case 0 : echo "Unspecified error."; break;
case 1 : echo "Hybriauth configuration error."; break;
case 2 : echo "Provider not properly configured."; break;
case 3 : echo "Unknown or disabled provider."; break;
case 4 : echo "Missing provider application credentials."; break;
case 5 : echo "Authentification failed. "
. "The user has canceled the authentication or the provider refused the connection.";
break;
case 6 : echo "User profile request failed. Most likely the user is not connected "
. "to the provider and he should authenticate again.";
$twitter->logout();
break;
case 7 : echo "User not connected to the provider.";
$twitter->logout();
break;
case 8 : echo "Provider does not support this feature."; break;
}
// well, basically your should not display this to the end user, just give him a hint and move on..
echo "<br /><br /><b>Original error message:</b> " . $e->getMessage();
}