session problem

Nov 7, 2007 at 7:29 PM

I'm trying to use a session variable that i set on an iframe page and then try and use on invite.aspx?fbforcemode=fbml.

it does not exist on invite.aspx?fbforcemode=fbml. if i just go to invite.aspx as expected the fbml does not render but the session variable exists!?!

I know that in fbml mode the page is being rendered on facebook but i thought the codebehind would still function as usual.

Is there a way around this problem? i've added the
protected void OnPreRender(EventArgs e)
Response.AppendHeader("P3P", "CP=\"CAO PSA OUR\"");

but as yet have seen no difference either way.

any ideas???

Thanks in advance
Nov 9, 2007 at 11:55 AM
i've tried using cookies accross my normail iframe page and the ?fbforcemode=fbml and that doesn't work either.

does anyone know whats wrong????

Nov 9, 2007 at 3:03 PM
I don't know if this is all of your problem, but I think the fb_force_mode parameter needs to be passed in the canvas page URL, not your callback page URL. Your server has no idea what fb_force_mode actually means - it needs to be processed on Facebook's servers so that they can then call your page and get the FBML. It would be easier if I could draw a picture, but unfortunately I can't here.

So, instead of linking to something like:
You'll want something more like:

I don't know offhand how you would get that to redirect to one certain part of your site, though. I'm sure others have done it before. You may check other places where people mention using that parameter and see how they did it.

Now, to help with the rest of the problem, when you do use that fb_force_mode parameter, what happens, exactly? Does anything render at all? Do you get an error message before the page returns any rendered markup?
Nov 10, 2007 at 5:18 PM
confused1234, I've been experiencing the same problem.

My iframe app has an invite.aspx?fb_force_mode=fbml and the invite page loads.

The problem is that all Session variables are NULL once the invite page or any other page with fbforcemode=fbml is displayed.

Any idea how to fix this?
Nov 11, 2007 at 12:21 PM
Edited Nov 11, 2007 at 12:27 PM

jschuster bflodd explains it better than me, the page is rendering no problem, the only problem is that all session variables are null, even if i set a variable on the invite.aspx?fbforcemode=fbml page and then reload it, the session variable is again null, the same happens with cookies.

If i add an fb:iframe to the page, the iframe has all the session variables but the main page does not.

if i don't add the ?fbforcemode=fbml parameter then all session variables are alive but obviously the fbml does not render...

Anyone have any ideas ?
I thought about sending all the info i need via post or get but i want a way to store it , in case the page is reloaded.

Nov 13, 2007 at 11:12 AM
Edited Nov 16, 2007 at 5:11 PM