Redirects don't work in v3 iframe app?

Feb 10, 2010 at 7:47 PM

After upgrading from 2 to 3, I found my Response.Redirects no longer work.  For some reason they make the framework think that the user has to log into Facebook again, and then I get an error that the API key is invalid; I set it in the constructor of the master page, which doesn't seem early enough in the case of the redirect...  but works every other time.

Although I didn't have to do it before, I tried making sure all the fb_sig* URL parameters were in the URL I redirected to but it didn't help.


Feb 10, 2010 at 8:05 PM

PS - I found that if I embed my key and secret in the web.config, instead of relying on code, I avoid the error -- but the page loads outside of the Facebook frame!


Feb 12, 2010 at 5:54 PM

FWIW, I know that this isn't an uncommon problem.  I found lots of suggestions, mostly for v2 though.

In the end doing this:

     url += "fb_sig_session_key=" + Api.Session.SessionKey + "&fb_sig_user=" + Api.Session.UserId + "&fb_sig_expires=" + (Api.Session.ExpiryTime.Ticks - 621355968000000000) / 10000000;

     Response.Redirect(url, true);


url += "fb_sig_session_key=" + Api.Session.SessionKey
+ "&fb_sig_user=" + Api.Session.UserId
+ "&fb_sig_expires=" + (Api.Session.ExpiryTime.Ticks - 621355968000000000) / 10000000;
Response.Redirect(url, true);

did the trick.

Again, I'm not sure why my redirects worked fine in v2 but failed in v3.  I thought the authentication was stored by FDT in a cookie or in session state so we didn't need to pass this around all the time. 



Sep 16, 2010 at 11:52 AM

i have the same problem my redirects do not work

what should i do?

is my webconfig file wrong

or should i do as ronmichael suggested? u know a better way? because so many is needing this now