ASP.NET

From Facebook Developer Wiki

Jump to: navigation, search

Contents

[edit] Tutorials

[edit] Libraries

[edit] Samples

cSharp InLine Publisher - sample May 2009 using FDT 2.0

[edit] Solution to an IE gotcha when developing Facebook App in an IFRAME

This was a very frustrating problem for us in our app Jobs (http://apps.facebook.com/getthejob).

The problem was that in IE, if a parent frame has a different domain than the child page, the session data (stored in the Session object) is not preserved as a security precaution.

Anyway, if you have this problem, the answer is available on Microsoft's website.

Simply put, in your ASP.NET page codebehind, add the following code:

[edit] C#

   protected override void OnPreRender(EventArgs e)
   {
       Response.AppendHeader("P3P", "CP=\"CAO PSA OUR\"");
       base.OnPreRender(e);
   }

[edit] VB

 Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
   Response.AppendHeader("P3P", "CP=""CAO PSA OUR""")
   MyBase.OnPreRender(e)
 End Sub

This will add the right headers to every page.

reference