这就是我通常在fbml f-connect标签中指定重定向网址的方式
<fb:login-button onlogin='redirect-url'>f-connect</fb:login-button>
如何在登录时指定重定向网址:
<div class="fb-login-button">f-connect</div>
??
答案 0 :(得分:8)
你现在就这样做了。由于登录按钮没有任何redirect_uri
,您需要FB.Event.subscribe
auth.authResponseChange
事件才能知道用户已登录:
FB.Event.subscribe('auth.authResponseChange', function(response) {
if (response.status === 'connected') {
window.top.location = '//redirect-url.com';
}
});