CanvasIframe: Redirected out of iframe

Feb 9, 2010 at 1:52 PM
Edited Feb 10, 2010 at 8:45 AM


Moving from Default.aspx (that doesn´t use a MasterFile) to another .aspx with a MasterFile that extends Facebook.Web.CanvasIFrameMasterPage and sets RequireLogin = true takes me to the app "Connect URL" outside the Facebook iframe with the auth_token appended. Not setting RequireLogin to true leads me to the correct page within the iframe but without access to the API ("A session key is required for calling this method").

Default.aspx.cs uses Facebook.Web.CanvasIFrameBasePage and sets RequiredLogin = true and I´m able to access the API from there. The MasterFile includes JavaScript for XFBML.

It seems to be working when appending the QueryString (auth_token) to the linked/redirected pages using the MasterFile, but this is no solution!

Using FDT 3.01 (same problem with 3.0)


Would appreciate any suggestions.

Feb 10, 2010 at 10:50 AM

Noticed that I didn´t replaced the 3.0 dll references successfully. Now I have but the problem still exists.

With one difference this time, navigating between Default.aspx and MyPage.aspx (both using the same MasterFile with RequireLogin set to true) now takes me from

"" to "" reloading the iframe that loades the "Connect URL" and I´m back to my Default.aspx.

I´m experiencing the same issues even with the FDT iframe sample (latest version) where I simply create a copy of Default.aspx named Default2.aspx and adding a link in Default.aspx to Default2.aspx. Click the link to Default2.aspx and your´re back at Default.aspx


What am I doing wrong, anything else I could try?

Really appreciate all help!

Feb 12, 2010 at 12:59 PM

I made some progress by downloading the source where I found some helpful comments. Instead of setting RequireLogin in the MasterPage constructor method I now do it in Page_PreInit().


namespace MyProject.Pages.FrameWork
	public partial class MyMaster : Facebook.Web.CanvasIFrameMasterPage
		protected void Page_PreInit(object sender, EventArgs e)
			RequireLogin = true;


Unfortunately I still encouter authentication issues when I´m navigating through my site.

Sorry for spamming this thread but I really need some help on this. Is there anything I should look for? Please help be understand RequireLogin better..

Mar 3, 2010 at 6:19 AM


I was wondering the same question.  I havn't tried it yet, but at the bottom of this post : : he says that

quote : "I basically had to add fb_sig_session_key, fb_sig_user, and fb_sig_expires to all my redirects (not an uncommon solution)."

Let me know your results.

Mar 5, 2010 at 7:45 AM

It seems to be working for me.

Mar 7, 2010 at 7:31 AM

Hi guys, try to update your library to the latest, it works then.

Mar 7, 2010 at 9:09 AM

I Still have the same problem in the 3.01 version...

Mar 7, 2010 at 9:14 AM

I put the requirelogin = true in the init event of the masterpage (I don't have pre_init event in masterpage)...

Mar 7, 2010 at 4:34 PM

and rebuild web site?