我试图在允许用户与我的网站共享基本信息后将用户重定向到页面。我使用以下代码:
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
页面。
在你的FB中。Connect.requireSession() 函数,
if (confirm('Are you willing to share information?')) {
location.href='abc.php';
}