Ajax, WebHandler and FacebookApplication

May 15, 2008 at 12:33 PM
Hello. Me again.

Well, now I am trying to modify the FBML in the profile. As it has to be dynamic, I would like to call an external AJAX script. I usually do that using a WebHandler, which is orking for me, but I would like to know then how to get the FacebookApplication in the Ajax script. I am seeing that the facebook mock ajax is passing through the form the necessary information to my webhandler (fb_sig_in_iframe, fb_sig_time, fb_sig_added, ...). So how can I create my FacebookApplication ?

I have tried:

<%@ WebHandler Language="C#" Class="fbmlHandler" %>

using System;
using System.Web;
using Facebook.Web;

public class fbmlHandler : IHttpHandler {

public void ProcessRequest(HttpContext context) {
    context.Response.ContentType =
FacebookApplication fbApplication = new FacebookApplication();


But the constructor takes no argument, and event if I have the correct session information, fbApplication.IsSessionCreated remains false. What should I do to populate correctly my FacebookApplication object ?