You are here

function fb_form_invite_page in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_form.module \fb_form_invite_page()
  2. 6.3 fb_form.module \fb_form_invite_page()
  3. 6.2 fb_form.module \fb_form_invite_page()
  4. 7.3 fb_form.module \fb_form_invite_page()

Create a page to invite friends to add an app.

This page will succeed only if:

  • shown on a canvas page
  • it is an FBML canvas page, not an iframe
  • the current user has added the application (not sure about this)
1 string reference to 'fb_form_invite_page'
fb_form_menu in ./fb_form.module
hook_menu.

File

./fb_form.module, line 119
This module defines facebook-specific form elements for use with Drupal's form API.

Code

function fb_form_invite_page() {
  global $fb, $fb_app;
  if (function_exists('fb_canvas_is_fbml') && !fb_canvas_is_fbml()) {
    drupal_set_message(t('Unable to display page.  FBML required.'), 'error');
    drupal_not_found();
    exit;
  }
  if ($fb_app) {
    drupal_set_title(t('Invite friends to use %application', array(
      '%application' => $fb_app->title,
    )));
  }
  $output = drupal_get_form('fb_form_multi_add_invite_form');
  return $output;
}