开发者

How to redirect to page after allowing permission in Facebook

I'm trying to redirect the user to a page after he allows to share basic info with my site. I use the following code:

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>';
}

This code displays a connect button when user is not logged in. If the user is already logged in an开发者_如何学Cd clicks on it, it displays permission for basic info.

I want to redirect the user to abc.php page when he allows the permission.


In your FB.Connect.requireSession() function,

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜