2011-05-16 37 views
0

我试图在用户与我的网站共享基本信息后将用户重定向到页面。我使用下面的代码:如何在Facebook中允许权限后重定向到页面

function render_fbconnect_button() { 

return '<a href="#" onclick="FB.Connect.requireSession(); return false;" > 
    <img id="fb_login_image" border=0 src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Connect"/> 
    </a>'; 
} 

这个代码显示在未登录用户连接按钮如果用户已经登录并点击它,它会显示权限基本信息。

我想在允许的情况下将用户重定向到abc.php页面。

回答

1

在你FB.Connect.requireSession()函数,

if (confirm('Are you willing to share information?')) { 
    location.href='abc.php'; 
} 
相关问题