Ready to get started?Download WordPress


Simple Facebook Connect
SFC Comments Logout Redirects to Specific Post (3 posts)

  1. dfd0226
    Posted 3 years ago #

    If I click "Logout" from within comments in my blog, I am redirected to a specific post. I have already tried deactivating all of my plugins, except SFC, but I have the same problem.

    WP-Theme: WooThemes Bueno
    URL: http://www.danedesutter.com/

  2. teonsight
    Posted 3 years ago #

    I think I'm in the same issue. My problem is: I'm looking at an attachment (image.php), and commenting it and logout. At this point I'm redirected to the parent post of the attachment.

    The problem should be in FB.Connect.logoutAndRedirect(\"<?php the_permalink() ?>\"), in these lines (taken from /plugins/simple-facebook-connect/sfc-comments.php):

    if (!jQuery('#fb-user').length) {
    		jQuery('#comment-user-details').hide().after("<span id='fb-user'>" +
    		"<fb:profile-pic uid='loggedinuser' facebook-logo='true' size='normal' height='96'></fb:profile-pic>" +
    		"<span id='fb-msg'><strong><fb:intl>Ciao</fb:intl> <fb:name uid='loggedinuser' useyou='false'></fb:name> !</strong><br /><fb:intl>Sei connesso con il tuo account Facebook.</fb:intl>" +
    		" <a href='#' onclick='FB.Connect.logoutAndRedirect(\"<?php the_permalink() ?>\"); return false;'>Logout</a>" +
    		jQuery('#sfc_comm_send').html('<input style="width: auto;" type="checkbox" id="sfc_comm_share" /><label for="sfc_comm_send"><fb:intl>Condividi anche su Facebook</fb:intl></label>');

    The Loop I'm using comments_template() in is a personalized one, so I've tried to add wp_reset_query() before comments_template(), but doesn't work, and after the logout I'm redirected to the parent post.

    Anybody can help?

  3. rocanlover82
    Posted 3 years ago #

    This worked for me:
    <a href="<?php echo esc_url( wp_logout_url( $_SERVER['REQUEST_URI'] ) ); ?>">Log out</a>

    I added it to the /sfc-comments.php in the sfc plugin folder

    "<a href='#' onclick='FB.Connect.logoutAndRedirect(\"<?php echo esc_url( wp_logout_url( $_SERVER['REQUEST_URI'] ) ); ?>\"); return false;'> <?php echo addslashes(__('Logout', 'sfc')); ?></a>"

    I hope this helps, here is the link where I found this info:


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic