I am not able to logout from the website if login using FB credientails.
Anyone has update on this.

Comments

mandarmbhagwat78’s picture

I got the solution to this and it's working.
I went through the fbconnect.module code and found that one condition is not becoming true

I implemented following solution to resolve the issue.
I have added id to the tag for logout

$output .= "<a id=\"logout\" href=\"".base_path()."logout\">".t('Sign out')."</a>";

So I commented the condition as it never come to this when ever I click on 'logout' link and added click event to the logout tag.

  //if (arg(0) == 'fbconnect' && arg(1) == 'logout') {
    $onload_js .= '$("logout").click(FB.Connect.logout(function() { 
                    window.location = '. $url .'; 
                  }));';
  //}

Above change is working for me. Is there any better approach to resolve this issue?

mandarmbhagwat78’s picture

Sorry, it didn't worked. Now I am trying to use another approach.
I found that fbconnect/logout menu item is missing from fbconnect.module. Also there is no call to fbconnect/logout menu link from fbconnect_user() function.
So I have created one module to do all this.
Here is the code :

/**
 * Implementation of hook_menu().
 */
function fblogout_menu() {
	$items['fbconnect/logout'] = array(
	'title' => t('Logout page - blank call'),
	'page callback' => 'fbconnect_logout_page',
	'access arguments' => array('access content'),
	'type' => MENU_CALLBACK,
	);

	return $items;
}

function fblogout_user($op, &$edit, &$account, $category = NULL){	
	switch($op)
	{
		case 'logout':
			drupal_goto('fbconnect/logout');
			break;
	}
}

When I am clicking on logout link, it come to logout operation but not going to fbconnect/logout.
But if I print some thing before drupal_goto('fbconnect/logout'); it is getting printed.

Any guess???

LaNets’s picture

I think you maybe have some javascripts error on your page, so when you tried to logout, the Facebook javascript is not triggered.

vectoroc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

betoaveiga’s picture

I'm having a similar problem... but I think I know why this is happening...

I think that this behavior is due to bad HTML. Seriously! When I have images that have URLs with spaces then the Facebook Connect button doesn't work... It sounds silly, but that's why in some pages the Facebook connect button appears, while in others don't.

I use HTML Tidy extension in Firefox, that's how I became suspicious about malformed HTML or URLs.

Avoid this kind of errors and probably your page will work...
"A URI contains impermissible characters or quotes around the URI are not closed."

What's wrong on having source images with spaces? I don't know, but avoiding this makes fbconnect to work right for me.

Hope that helps...

test1111’s picture

Version: » 6.x-2.0-alpha2

Hello all,
I have face problem with fbconnect module.

This issue is form my custom theme.I have alter the login block to match with my site design. Now when i connect with my facebook account i can connect with my site properly. But when i try to logout from my site at that time i am not going to logout from the facebook. Even i have set from admin that ask to logout from facebook to user.

When i use garlend them then its work proper for the signout process I.E at that time it will ask me that would u like to logout from facebook...

One more thing if i enable the fast registration process form admin panel then i can not get any registration confirmation mail in my given email address....

I have almost try all the given solution provided by various form.. And even all thing are configured well. And also add the required code in my page.tpl.php , page-front.tpl.php.

But still problem with my logout process of custom theme.

Please help..
Thanks in advance.