How to Use

Coordinator
Jun 25, 2008 at 4:27 AM

Using the Facebook Developer Toolkit MVC Addon is really easy once you've add your configuration into the web.config file.

If you are creating an IFrame Facebook app use the following ActionFilter:

 [Facebook.Web.Mvc.InitializeIframeAction()]
        public ActionResult Index(FacebookAPI facebookAPI)

For FBML Facebook applications use:

 [Facebook.Web.Mvc.InitializeFbmlAction()]
        public ActionResult fbml(FacebookAPI facebookAPI)


Notice that both Controller Actions accept a FacebookAPI object named facebookAPI -> this is required!  This is how a fully loaded FacebookAPI object is returned to your controller action.  You can use the facebookAPI instantiated object (which is from the FBDT) inside your controller action to perform various tasks and access various information.