I noticed that there are several FB.getSession calls that still on FB.js, I read the documentation on FB Developer site that they removed FB.getSession. I hope we can remove it in the future in favor og FB.getAuthResponse()

And also as of Feb 1, 2012 I noticed that FB._oauth always returns "undefined" now and this is consistent, because of this FB.getSession will be called and that is not available anymore and on chrome it throws "Uncaught TypeError: Object #

has no method 'getSession'". And as of standing this module is broken because if this. As for the quickfix on my site I removed the condition that checks FB_oauth and it will always run the statement IN IF condition that is to run FB.getAuthResponse() and I commented/removed the statements on ELSE that calls FB.getSession. I hope this helps... Thanks!

Comments

euphoric_mv’s picture

I have the same problem. In which file i suppose to change that you describe and on which line? I found fb._oauth in fb.js file but there are 2 if (FB._oauth) statement.

Thank you a lot!

euphoric_mv’s picture

I just did what you said and i dont get "Uncaught TypeError: Object # has no method 'getSession'" in console anymore. But facebook connect still doesnt work. This began to happens today. I dont know what to do. Did facebook change some code or what, i realy dont get it...

ervindm’s picture

You need to do that for both. That willforce them to use FB.getAuthResponse(). Thanks!

pdouglas’s picture

This works for me, but isn't the correct solution.
I generated a patch.

Tanks for this quick fix ervindm!

r2b2’s picture

Hello,
Im having infinite reload loops when logging out if I remove the oauth lines as posted originally.

r2b2’s picture

Actually it works when I tick :

"Append hash on javascript page reload" on admin/build/fb/settings.

Thanks a lot for this hack!

aleada’s picture

StatusFileSize
new55.73 KB
new12.32 KB

with the above settings the facebook connect works fine.
If anyone has problem with the logout link please take look at http://drupal.org/node/1364394

hate90’s picture

thanks armatech your txt worked perfectly

Shven’s picture

the module works as expected after applying armatech's patch. Tnx!

miccelito’s picture

@amatech

Referring to your post #7

Using your suggestion I succeed to login without any problem or errors in the db report log.
But when I logout I need to click the logout link twice to be able to logout as well I get this db report log message:

fb_api_check_session failed.: Error validating access token: The session is invalid because the user logged out. 0
OAuthException: Error validating access token: The session is invalid because the user logged out.

msti’s picture

#3 worked for me.
Thanks ervindm

Dave Cohen’s picture

Version: 6.x-3.2-rc3 » 6.x-3.x-dev
Status: Active » Fixed

I believe this is fixed in latest release. Please correct me if I am wrong. Tell me exactly how to reproduce.

Status: Fixed » Closed (fixed)

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