Facebook Connect (logging out elegantly)

I noticed that when I log in and out from my site using Facebook Connect.. I 'm still logged in @facebook. And When I log out from facebook first, I can never log out from my site. Coz the cookie was already killed and dolphin unceremoniously complains about invalid authentication.

So, a perfect logout is always two steps (first @mysite and then @facebook). I just thought this might be a bug so.. (or is it just me?) Or is there a way to kill the facebook cookie from mysite when I log out..

Quote · 17 Jan 2010

I have said this before and I will make the announcement here too. :) FACEBOOK CONNECT SUCKS!

Run from this mod.

Quote · 17 Jan 2010

Not very elegant at all. It would not let me log out of my site either with the following error message:

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php:1915 Stack trace: #0 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php(223): FacebookRestClient->call_method('facebook.auth.e...', Array) #1 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php(28): FacebookRestClient->auth_expireSession() #2 /home/cbass/public_html/socialathens.com/inc/classes/BxDolAlerts.php(105): BxFaceBookConnectAlerts->response(Object(BxDolAlerts)) #3 /home/cbass/public_html/socialathens.com/inc/profiles.inc.php(473): BxDolAlerts->alert() #4 /home/cbass/public_html/socialathens.com/logout.php(28): bx_logout() #5 {main} thrown in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php on line 1915

Although I tried different permutations of logging in and out of FB again to get rid of it, it simple would not let me log out of my user profile. So I got fed up and uninstalled it from Admin panel. Presumably clearing my cache would have done the trick but if I have to resort to that step, then I may as well just uninstall it as wait for some fixed to come out. I certainly will not be letting my users use FB connect at the moment.

Quote · 19 Jan 2010

Not very elegant at all. It would not let me log out of my site either with the following error message:

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php:1915 Stack trace: #0 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php(223): FacebookRestClient->call_method('facebook.auth.e...', Array) #1 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php(28): FacebookRestClient->auth_expireSession() #2 /home/cbass/public_html/socialathens.com/inc/classes/BxDolAlerts.php(105): BxFaceBookConnectAlerts->response(Object(BxDolAlerts)) #3 /home/cbass/public_html/socialathens.com/inc/profiles.inc.php(473): BxDolAlerts->alert() #4 /home/cbass/public_html/socialathens.com/logout.php(28): bx_logout() #5 {main} thrown in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php on line 1915

Although I tried different permutations of logging in and out of FB again to get rid of it, it simple would not let me log out of my user profile. So I got fed up and uninstalled it from Admin panel. Presumably clearing my cache would have done the trick but if I have to resort to that step, then I may as well just uninstall it as wait for some fixed to come out. I certainly will not be letting my users use FB connect at the moment.


This one is actually a common problem related to the facebook connect API itself and not dolphin. If you look that error up in google "Fatal error: Uncaught exception 'FacebookRestClientException'" , you will find it happens from time to time with a lot of apps that use facebook connect.

Some have resolved it by logging into facebook and looking in the list of apps and removing the one pertaining to your site from the list.  But that procedure does not always work.

https://www.deanbassett.com
Quote · 19 Jan 2010

I noticed that when I log in and out from my site using Facebook Connect.. I 'm still logged in @facebook. And When I log out from facebook first, I can never log out from my site. Coz the cookie was already killed and dolphin unceremoniously complains about invalid authentication.

So, a perfect logout is always two steps (first @mysite and then @facebook). I just thought this might be a bug so.. (or is it just me?) Or is there a way to kill the facebook cookie from mysite when I log out..


I tested both the scenarios

1) when I log in and out from my site using Facebook Connect. I 'm still logged in facebook.
>> The logic they wrote in "modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php" doesnt actually expires the facebook session

2) And when I log out from facebook first, I get a FATAL ERROR
>> Since facebook session is already expired, script cant access the FB Session keys

Here's the Quick and dirty solution to this issue until they fix it

open "modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php" file

find
-----------------------------------------
case 'logout' :
-----------------------------------------

Replace with below
-----------------------------------------
case 'logsout':    
-----------------------------------------

Basically, what i am doing above is just changing the switch case name to something else so the script never goes into logic that is suppose to expire the FB Session

Looking for Help? http://www.boonex.com/kevinmitnick
Quote · 19 Jan 2010

Not very elegant at all. It would not let me log out of my site either with the following error message:

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php:1915 Stack trace: #0 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php(223): FacebookRestClient->call_method('facebook.auth.e...', Array) #1 /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php(28): FacebookRestClient->auth_expireSession() #2 /home/cbass/public_html/socialathens.com/inc/classes/BxDolAlerts.php(105): BxFaceBookConnectAlerts->response(Object(BxDolAlerts)) #3 /home/cbass/public_html/socialathens.com/inc/profiles.inc.php(473): BxDolAlerts->alert() #4 /home/cbass/public_html/socialathens.com/logout.php(28): bx_logout() #5 {main} thrown in /home/cbass/public_html/socialathens.com/modules/boonex/facebook_connect/inc/facebookapi_php5_restlib.php on line 1915

Although I tried different permutations of logging in and out of FB again to get rid of it, it simple would not let me log out of my user profile. So I got fed up and uninstalled it from Admin panel. Presumably clearing my cache would have done the trick but if I have to resort to that step, then I may as well just uninstall it as wait for some fixed to come out. I certainly will not be letting my users use FB connect at the moment.


This one is actually a common problem related to the facebook connect API itself and not dolphin. If you look that error up in google "Fatal error: Uncaught exception 'FacebookRestClientException'" , you will find it happens from time to time with a lot of apps that use facebook connect.

Some have resolved it by logging into facebook and looking in the list of apps and removing the one pertaining to your site from the list.  But that procedure does not always work.

Thanks for the heads up on that. It is the first time I have used FB connect and was not very impressed with my initial account test. To be quite honest I think I will leave FB connect whether it is FB or Dolphin for the moment. Initially I thought what a great idea, but now I feel as though it is some thing that needs some work. First impressions count. The wife would disagree.

Quote · 19 Jan 2010

Well, that's just that error, i am not saying that the FB module provided by boonex don't have problems, because it does, plenty of them. So far though, only one problem that i am aware of has actually been fixed in the latest trac source.

https://www.deanbassett.com
Quote · 19 Jan 2010

http://www.boonex.com/trac/dolphin/ticket/1715

http://www.boonex.com/trac/dolphin/ticket/1751

Rules → http://www.boonex.com/terms
Quote · 20 Jan 2010

MASSIVE THANK YOU!!  I just am always amazed by the acts of kindness that one can find on the web. It just never fails to amaze how people help each other out. Why can't the rest of the world be like this.

GEEKS OF THE WORLD UNITE!!Sealed

Quote · 25 Jan 2010

ok, i tried to login on a seperate face book account on my computer... this is what I get.

here is the link to screenshot

That is a issue i have never seen with the FB connect before. We most likley would need more information on how your system is setup. Primarly membership types. I suspect you must be running some membership requirement setup that has not yet been tested with the FB connect system.

https://www.deanbassett.com
Quote · 30 Jan 2010

bump,

where is the repair in the trac's

http://www.boonex.com/trac/dolphin/ticket/1715 states closed...

http://www.boonex.com/trac/dolphin/ticket/1751

not logging out is not the problem. change the email address in the "email" field where "apps+64646445..." and put your actual mail address and save... there is the problem

The most recent code for dolphin can be grabbed here. http://www.boonex.com/trac/dolphin/browser/trunk

You would need to obtain all the files for the facebook connect module and update them.

Now as for the email thing. The apps+436456364 ect is a facebook proxy email. Getting the real email address is not possible without asking the FB user for extended permissions. Most would not do this anyway, and dolphin was not designed to deal with the extra page FB generates to obtain those extended permissions, so it just can't be done.

https://www.deanbassett.com
Quote · 30 Jan 2010

Looks like someone has a fix for Drupal here.

http://drupal.org/node/345540#comment-1154646

Anyway we can implement a similar for Dolphin soon?

Quote · 12 May 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.