Why my iframe app have to use Inherits....CanvasFBMLBasePage

Dec 10, 2009 at 7:07 AM

with iframe,aspx(vb.net)
i write a easy iframe dot.net app.
in my codefile(.vb)

Imports .......................
Partial Class _Default
    Inherits Facebook.Web.CanvasIFrameBasePage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Response.Write(Api.Users.GetInfo().first_name & "this is a iFrame app")
    End Sub
    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        Me.RequireLogin = True
    End Sub   
End Class

Than I put my app to facebook.When I run the app , I got a error message. "String can not be identified as a valid DateTime. The starting point for the index 11 has an unknown text."

Than I chane my code ::Partial Class _Default   Inherits Facebook.Web.CanvasIFrameBasePage  to Partial Class _Default   Inherits Facebook.Web.CanvasFBMLBasePage

It's work fine in Facebook.



Dec 14, 2009 at 5:39 AM


Dec 15, 2009 at 10:02 PM
ap4492 wrote:


 I'm pretty new to this, but i can show you what I did.  I have a main page that redirects to an IFrame page and it seems to work.  I'm doing that because my main page also has some FBML in it.

Main page contains:
<cc1:IFrame ID="IFrame1" runat="server" Src="http://www.mysite.net/FacebookTest/Iframesite.aspx"
        Width="760" Height="600" Scrolling="Disabled" FrameBorder="False" Xfbml="True" />

Iframesite.aspx contains:
using Facebook.Web;

namespace FacebookBaseSite
    public partial class Iframesite : CanvasIFrameBasePage
        protected void Page_Load(object sender, EventArgs e)
            this.RequireLogin = true;

            Label1.Text = "Welcome to my Iframe!  Your UserId is "  +

That seems to work for me, sorry it's in C#, I don't know VB.  Like I said though, my Facebook app is set as FBML not IFrame, I just include an Ifram in my app, if that makes sense, but the concept should be the same.  Also make sure the "Src" proprty under the Iframe control is the full URL to your page.