0

ここに私の問題の印刷画面があります

Facebook Javascript SDK に問題があります....動作していますが。ログインをクリックすると... Facebookにサインインするポップアップショーが表示されます(これは問題ありません)..問題は、ポップアップログインにサインインするときにウィンドウが閉じないことです. 、親ページもFacebookのログインページにリダイレクトされます.どうすれば修正できますか? ところで、私はRuby on Railsを使用しています。

ここに私のfacebook.jsがあります:

window.fbAsyncInit = function() {
  FB.init({
    appId      : "XXXXXXXXXXXXXXXX", // App ID
    status     : true, // check login status
    cookie     : true, // enable cookies to allow the server to access the session
    xfbml      : true  // parse XFBML

  });


    $(function() {
      $("#signin").click(function() {
        FB.login(function(response, event) {
           if (response.authResponse) {
             $.cookie("user_id", response.authResponse.userID);
             $.cookie("access_token", response.authResponse.accessToken);
             window.location = "#{auth_facebook_callback_url}";
          } else {
          }
        }, {scope: 'email,read_stream,publish_stream,offline_access'});
      });
    });


    $(function() {
        $("#signout").click(function(){
            FB.getLoginStatus(function(response){
                if(response.authResponse){
                    FB.logout();
                }
            });
        });
    }); 
 };
// 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));

前もって感謝します :)

4

1 に答える 1