开发者

prevent auto login with connect web facebook integration

开发者 https://www.devze.com 2023-02-06 06:26 出处:网络
I am using Facebook integration on my web for user to log on. Here is the problem I am facing: Assume the user is already logged on to \"facebook\" and not my website. THEN 开发者_开发问答they go to

I am using Facebook integration on my web for user to log on.

Here is the problem I am facing:

Assume the user is already logged on to "facebook" and not my website. THEN 开发者_开发问答they go to my site and since I have < FB.Event.subscribe('auth.login', > it automatically tries to log in the user from my main page.

How do I prevent this?

Thanks Behrouz


I think it may not possible to prevent auto login when any user already logged into facebook with same browser.
Because facebook shared user authenticate cookies to same browser. so user must Logged Out from facebook then n then it will works.

If you are php developer then see into this link. It may be useful.
Facebook Connect disable auto login

 FB.init({ 
      appId   : '<?php echo $facebook->getAppId(); ?>',
      session : <?php echo json_encode($session); ?>, // don't refetch the session when PHP already has it
      status  : true, // check login status
      cookie  : true, // enable cookies to allow the server to access the session
      xfbml   : true // parse XFBML
    });     
    FB.Event.subscribe('auth.login', function() {
      window.location = "process-login.php";
    });
0

精彩评论

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