views:

29

answers:

1

I'm building a Flash-based (AS3) website that incorporates Facebook Connect through a combination of the AS3 API and the Javascript API. Everything is working fine in Firefox; users are able to authenticate / login via the site, and I can make calls and receive userdata from Facebook without a problem.

However, in IE (7 & 8, at least), my call to FB.Connect.requireSession(onLoginHandler), which should prompt users to connect/login, fails silently--nothing happens. I fired up the IE javascript console to investigate the situation; here's a brief transcript (>> is the console prompt):

>>FB
{...}
>>FB.Connect
{...}
>>FB.Connect.requireSession(onLoginHandler)
undefined
>>someNonExistentVariable
"'someNonExistentVariable' is undefined"

As you can see, FB and FB.Connect are both defined, and it appears that FB.Connect.requireSession is as well; compare the "undefined" it returns with the error message thrown when I try to reference a non-existent variable. However, I've got no idea whyFB.Connect.requireSession is returning undefined and I've got to get this application working in all browsers.

Any thoughts as to what might be causing this?

Thanks in advance for your consideration!

A: 

I figured out what was going on; this URL proved helpful: http://wiki.developers.facebook.com/index.php/Connect/Authorization_Websites

In my call to requireSession, I was omitting the second parameter ("isUserActionHint"), which needs to be set to 'true' when the call is made in the context of a Flash site. Apparently Firefox didn't mind that it was missing, but IE's a stickler for it. Hopefully this helps someone else down the line...

justinbach