Canvas Page Recipes

The term Canvas Page refers to the original flavor of Facebook Application. That is, content which appears within Facebook, as opposed to a Facebook Connect application. If the URL starts with http://apps.facebook.com/..., then we're talking about a Canvas Page.

Enabling Canvas Pages

  1. Make sure the Canvas Pages module (under Drupal for Facebook) is enabled.
  2. Enable a theme which is canvas page aware. This could be an FBML flavored theme or an iframe flavored theme, depending on which style of canvas page you intend to support. Drupal for Facebook comes with a theme called fb_fbml which is a good one to start with, and supports both FBML and iframe. You may need to copy the fb_fbml/ directory from .../module/fb/themes/ to .../themes/ before enabling it!
  3. When editing your application on facebook's developer app, under Canvas you can choose a Canvas Page URL. Make sure this is selected.
  4. When configuring your Facebook Application node, look at the Facebook canvas pages fieldset. Here, you can specify whether anonymous users are permitted to view canvas page, which theme to use, and several other options.
  5. Save the Facebook Application node, then visit your Canvas Page URL. Hopefully it works!

Canvas Page Form Handling

Canvas pages can be tricky, because the user's browser is pointed to one URL, say http://apps.facebook.com/drupalforfacebook, but content is

Guide maintainers

Dave Cohen's picture