2

我坚持使用 facebook 登录按钮,登录效果很好,但是当我通过 logout.php 从网站注销时,它让我在 facebook 按钮上登录(但从网站注销!)请帮助我..这里是代码

<div id="fb-root" style="display:none;"></div>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script>
    (function(d, debug){
        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;
        ref.parentNode.insertBefore(js, ref);
        }(document, /*debug*/ false));

    window.fbAsyncInit = function() {
    FB.init({
        appId      : '<?php echo FACEBOOK_APP_ID; ?>',
        channelUrl : 'www.###.com', // Channel File for x-domain communication
        status     : true, // check the login status upon init?
        cookie     : true, // set sessions cookies to allow your server to access the session?
        xfbml      : true  // parse XFBML tags on this page?
    });
    FB.Event.subscribe('auth.login', function () {
        window.location = 'www.????????.com';
    });
</script>
    <fb:login-button autologoutlink='true' perms='email' length="short" size="medium">Log In with Facebook
    </fb:login-button>
4

0 回答 0