开发者

Facebook Login Button: logout issue

I'm using Facebook PHP SDK v2.1.2 and JS SDK on my page. I've put a <fb:login-button autologoutlink="true"></fb:login-button>

[...]
  <head>
    <script type="text/javascript" src="http://connect.facebook.net/pt_BR/all.js#xfbml=1"></script>
    <script type="text/javascript">
      FB.init({
          appId: '{$appId}',
          cookie: true,
          status: true,
          xfbml: true
      });
      FB.Event.subscribe('auth.logout', function (response) {
          alert('Bye!');
          window.location.refresh();
      });
    </script>
  </head>
  <body>
    <div id="fb-root"></div>
    <fb:login-button autologoutlink="true"></fb:login-button>
[...]

When I'm logged I can see the logout button, but when I click on it nothing happens. Am I missing something? I use the <fb:login-button> on logon and it works like a charm with开发者_如何学Python PHP SDK!

Thank you in advance.


Instead of

window.location.refresh();

Try

window.location.reload();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜