Trouble with persisting Facebook session key

May 25, 2010 at 4:56 PM

I have an iframe app that's been running for quite a while with FDT.  I've certainly had ups and downs as I moved to new versions but I always muddled through.  One thing that's always been a sore spot is the Facebook session key.  The FDT doesn't seem to hold on to it very well.

For example: I have a new problem where a form in my app no longer works the first time the user submits it; submitting only takes them back to the empty form, but after resubmitting it works!  I used Fiddler to see what was going on.  After submission, my server calls the getLoggedInUser API without a session key.  It gets rejected, logs in again, and redirects the user back to the form.  The second time the user submits the call to getLoggedInUser includes the session key and it works.

I just don't get how FDT stores and manages the session key.  It doesn't seem like it is a URL parameter of the iframe URL.  The posted data from the form seems identical in both scnearios.  I see the session key posted as a cookie (SessionKey) in both cases.  It just seems like in first case FDT doesn't pull the session key from the cookie, but it does in the next.