fb.xd.resolverelation (...). fb '- ноль или не объект Сводит меня с ума - PullRequest
0 голосов
/ 16 февраля 2012

Я пытался часами пытаться заставить это работать ... В некоторых браузерах IE ВНИМАНИЕ: не все, я получаю эту ошибку, когда пытаюсь соединиться с логином Facebook

fb.xd.resolverelation(...).fb' is null or not an object

Ошибка появляется, когда скрипт внутри всплывающего окна возвращается на мой сайт после входа в Facebook.

Мой код выглядит так для подключения

window.fbAsyncInit = function() {
          FB.init({
            appId      : '12345',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
            channelUrl : '//site.com/pages/channel.php',
          });

      function updateButton(response) {
                     //button       =   document.getElementById('fb-auth');
                     loginHolder = document.getElementById('faceAccess');



                     if (response.authResponse) {
                         //user is already logged in and connected
                         loginHolder.style.display = "none";
                         FB.api('/me', function(info) {
                             login(response, info);
                         });

                     } 
                 }

      //window.onload=function(){
          // run once with current status and whenever the status changes
          FB.getLoginStatus(updateButton);
          FB.Event.subscribe('auth.statusChange', updateButton);
      //}

    };
    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));

1 Ответ

0 голосов
/ 17 февраля 2012

Попробуйте изменить status : true, на status : false, и посмотрите, дает ли это лучшие результаты.

...