Problems with session

Jul 21, 2007 at 4:07 PM
Edited Jul 21, 2007 at 4:09 PM
Hi All,
I have just downloaded Facebook Developer Toolkit and am playing around. I want to make an app that updates the users profile, so using CanvasIFrameBasePage and the examples given for handling authentication I made a page.
I then added a dropdownlist and a button, when the user clicks the button I want to call SetFBML to write out the value of the dropdownlist to the profile page, easy right?
Well the problem I am having is that when I click the button and do the post back I get the error "Invalid parameter" (see comment in code below for the line that is causing the problem)

if (!String.IsNullOrEmpty(sessionKey))
_fbService.SessionKey = sessionKey;
_fbService.UserId = userId;
// This will be executed when facebook login redirects to our page
else if (!String.IsNullOrEmpty(authToken))
_fbService.CreateSession(authToken); ///////////////// ERRORS HERE ON POST BACK
Session"facebook_session_key" = _fbService.SessionKey;
Session"facebook_userId" = _fbService.UserId;
Session"facebook_session_expires" = _fbService.SessionExpires;

now, I would have thought that the page should not even be hitting this code on post back because right above it, the sessionKey is checked and that should have a value right? Except every time it is null, along with the userId, indicating the session has been reset!

Maybe I am missing the obvious but I can't work it out, can any one out there point me in the right direction? Should I be using an infinite session? Anyone got any examples?

Jul 21, 2007 at 7:55 PM
I have realised I am using the CanvasIFrameBasePage all wrong, the demo I was viewing were for v1.0 of the Toolkit, not got it working yet but I think I see where I have been going wrong
Jul 24, 2007 at 10:06 PM
Cool. Let us know if you continue to have issues.