2012-11-14 2 views
0

fancybox와 관련된이 문제는 나를 미치게합니다. 링크를 클릭하면로드 아이콘이 계속 나타나며 페이지가 표시되지 않습니다. 몇 가지 사항을 테스트했지만 왜 이러한 일이 발생하는지 전혀 모릅니다.fancybox가 내 페이지를로드하지 않는 이유는 무엇입니까?

특정 종류의 페이지에서만 발생하며 페이스 북으로 사용자를 등록하는 데 사용됩니다 (내부적으로 hybridauth 사용). 그들은 페이스 북 사이트에서 권한 부여를 요청 받아야하지만 그 대신 아무 것도하지 말아야한다. 물론 fancybox가 없어도 정상적으로 링크를 열면 정상적으로 작동합니다.

나는 당신이 그것을 자유롭게 탐험 할 수 있도록 문제의 실제 예를 만들었습니다. Live test

추가 정보가 필요하면 도움을 주셔서 감사합니다. 감사합니다.

편집

:

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

'bandsheep.com'은'andsheep.com'이 아니지? 'andsheep.com'을로드하려고합니다. 리디렉션의 원인이되는 페이스 북 설정을 확인하십시오. – Naveed

+0

register.php의 php 코드를 게시하여'$ _GET [ 's']'... 후 또한 무엇이'.htaccess'의 관련 부분에 있는지 알면 어느 것이 유용할까요? '? s = facebook' ('http : //bandsheep.com/sof/register.php? s = test') 예를 들어 아무것도 반환하지 않을 때 잘못된 장소 – JFK

+0

* facepalm * 내 잘못으로 URL 리다이렉션 것이 고쳐졌습니다. . – Frildoren

답변

0

귀하의 register.php가 반환 :

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

당신도 있습니다 dirname(__FILE__)에서 한 줄, 그러나 다른되지 여기 는 register.php 소스입니다 .

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

어쨌든, 지금은 페이스 북의 링크에 .htpasswd 로그인 상자 ...

+0

은 고정되었지만 여전히 작동하지 않습니다. – Frildoren

0

받고 있어요 나는 문제가 iframe에 대한 인증 대화 상자가 페이스 북의 블록있을 것 같아요.

관련 문제