CanvasFBMLBasePage v2.0 Nothing Happen?

Feb 2, 2009 at 3:52 PM
Hi, I have problem on useing CanvasFBMLBasePage on v2.0, I try create simple FBML base page with code like this:

ASPX Design file:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<form id="form1" runat="server">
<div>
    Hello, <%= API.users.getInfo().name %>
</div>
</form>

ASPX Code file:
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using facebook;
using facebook.web;

public partial class _Default : facebook.web.CanvasFBMLBasePage
{
    protected void Page_PreInit(object sender, EventArgs e)
    {
        base.RequireLogin = true;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        string _name = API.users.getInfo().name;
    }
}

And web.config file:
<appSettings>
        <add key="APIKey" value="MYKEY"/>
        <add key="Secret" value="MYSECRET"/>
        <add key="Callback" value="MYCALLBACK"/>
</appSettings>

I already configure my application on Facebook with canvas configuration FBML mode. But when I run the application it do nothing or exactly doing no request. I put break point on (string _name = API.users.getInfo().name;), the break point never executed. Just never get that line. Is this a bug because it seem the other things work fine (the API, FQL and XFBML) on the toolkit.

Thanks.





Mar 24, 2009 at 10:53 PM
Hi aristondarmayuda,

Did you sort this problem out? I met the same problem but haven't found any solution about it.
Apr 5, 2009 at 7:42 PM
You probably need to call the base.Page_Load() from somewhere in your page_load method.
Developer
Apr 6, 2009 at 2:40 PM
@jgale, yes.

base.Page_Load() method should be called. However when used with parameters (object, EventArgs), I also got error. Should we call it without parameters?
Apr 14, 2009 at 4:24 AM
I have solved the problem. Not quite sure the problem is the same as aristondarmayuda's.
The probelm occurred on my pages when the firewall of server block the communication from Facebook server.
Apr 23, 2009 at 10:15 AM
Hi aristondarmayuda,
i hope u got empty page . its not even redirect to facebook at all . Am i Write if u r in this case  in facebook.web  project (download from source code) in BasePageHelper.cs file

->LoadFBMLPage(some args...) in last Response.write("......") just reaplce with response.redirect... it will redirect to facebook u can get the result also