-1

我的网站是:http ://bit.ly/OF9NHS

在页面下半部分的选择框上,当我单击 Facebook Connect 按钮然后登录时,它只是“挂起”并显示一个空白窗口并且什么也不做。

我怎样才能让它继续,以便将用户信息返回到我的表单?

我在这里搜索过,但没有找到适合我情况的任何解决方案。谢谢 :-)

这是我的代码:

/////////////////////////////////////////////////////////////////////////////////////////////////////
 /// facebook + optin box scripts
 /////////////////////////////////////////////////////////////////////////////////////////////////////

    window.fbAsyncInit = function() {
      FB.init({
        appId      : '271302529636100', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
    };
    // Load the SDK Asynchronously
    (function(d){
       var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
       if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       ref.parentNode.insertBefore(js, ref);
     }(document));



//           FB.init({ 
//              appId:'271302529636100', cookie:true, 
//              status:true, xfbml:true 
//           });
        function register_with_fb_222(){

            FB.login(function(response) {

            if (response.authResponse) {
                FB.api('/me', register_user_fb_222);

            } else {
                alert('You need to Grant Permission to Register with Facebook.')
            }

        }, {scope:'email,user_about_me'});

        }
        function register_user_fb_222(user){
            document.getElementById('name1').value=user.first_name;
            document.getElementById('email1').value=user.email;
            document.forms['mainForm1'].submit.click();

        }
4

1 回答 1

1

你需要删除

  <div id="fb-root" class=" fb_reset">
    <div style="position: absolute; top: -10000px; height: 0px; width: 0px; ">
      <div>
        <iframe id="fb_xdm_frame_http" name="fb_xdm_frame_http" src="http://static.ak.facebook.com/connect/xd_arbiter.php?version=6#channel=f2929cfda&amp;origin=http%3A%2F%2Fwww.hinsdalearearugcleaning.com&amp;channel_path=%2F%3Ffb_xd_fragment%23xd_sig%3Df30d8d28b%26&amp;transport=postmessage"></iframe>
        <iframe id="fb_xdm_frame_https" name="fb_xdm_frame_https" src="https://s-static.ak.facebook.com/connect/xd_arbiter.php?version=6#channel=f2929cfda&amp;origin=http%3A%2F%2Fwww.hinsdalearearugcleaning.com&amp;channel_path=%2F%3Ffb_xd_fragment%23xd_sig%3Df30d8d28b%26&amp;transport=postmessage"></iframe>
      </div>
    </div>
  </div>

从您的标记(顺便说一句,这是非常极端的!),您正在搞乱 JS SDK 的内部实现细节......

该页面正在加载超过 10MB 的资源,其中两个 PNG 超过 4MB...

于 2012-08-06T00:18:16.593 回答