• Resolved mix359

    (@mix359)


    Hi,
    I wanna report a bug and my solving to that about the logout.
    I’ve seen that you force the user to logout from his facebook account, ‘couse if you don’t, your wordpress relog the user in, right?

    I’ve found why (on my site) the user is relogged in:
    When you want to logout a user, you have to delete the fbsr_ cookie.
    You do this in the sfc_login_logout() function in sfc-login.php, in this line:
    setcookie(‘fbsr_’ . $options[‘appid’], ‘ ‘, time() – 31536000, “/”, $domain);
    But this code don’t work on the website that have in the home_url() of his wordpress the http://www., couse the facebook cookie is sended to .site.ext, and with your code, you try to delete the .www.site.ext cookie.
    I’ve modified the line in this way:
    $domain = ‘.’.str_replace(“www.”,””,parse_url(home_url(‘/’), PHP_URL_HOST));

    And after that don’t need to do the sfc_login_logout_js (don’t wanna do that… the user hate it)
    Bye
    Mix

    http://wordpress.org/extend/plugins/simple-facebook-connect/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Logging out of Facebook is actually the way recommended by Facebook themselves. I’m just implementing their recommendations in that respect. Clearing the cookie works too, but isn’t the way they suggest.

    Thread Starter mix359

    (@mix359)

    Thanks for the awnser.
    Cannot you put a setting to disable? (or something in the code like an hook that can be removed from an other file)
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Simple Facebook Connect] logout bug’ is closed to new replies.