开发者

How to redirect to page after allowing permission in Facebook

开发者 https://www.devze.com 2023-03-06 17:09 出处:网络
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:

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

精彩评论

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