0

ファンシーボックスのこの問題は私を夢中にさせています。リンクをクリックすると、読み込み中のアイコンが永遠に表示され続け、ページが表示されません。私はいくつかのことをテストしましたが、なぜこれが起こるのか分かりません。

これは特定の種類のページでのみ発生し、Facebook にユーザーを登録するために使用するページです (内部では HybridAuth を使用しています)。彼らはFacebookサイトで承認を求められるべきですが、代わりに何もありません. もちろん、fancybox を使用せずに通常どおりにリンクを開くと、問題なく動作します。

問題の実際の例を作成したので、自由に調べることができます。 ライブテスト

さらに情報が必要な場合は、お尋ねください。ありがとうございました。

編集: register.php ソースは次のとおりです。

<?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();
}
4

2 に答える 2

0

register.phpが返されます:

http://www.andsheep.com/dev/tests/live/BS_tests/hybridauth/hybridauth/?hauth.start=Facebook&hauth.time=1352910122&r=

あなたも持っています:dirname(__FILE__)1つの行にありますが、他の行にはありません。

$config = dirname(__FILE__) . '/hybridauth/hybridauth/Hybrid/config.php';
require_once( "hybridauth/hybridauth/Hybrid/Auth.php" );

とにかく、今私はFacebookのリンクに.htpasswdログインボックスを取得しています...

于 2012-11-14T16:31:08.923 に答える
0

問題は、Facebook が iframe の認証ダイアログをブロックしていることだと思います。

于 2012-11-15T10:23:21.863 に答える