You are here

function fb_form_invite_page in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 5.2 fb_form.module \fb_form_invite_page()
  2. 5 fb_form.module \fb_form_invite_page()
  3. 6.3 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
Implementation of hook_menu().

File

./fb_form.module, line 115
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 (!fb_is_fbml_canvas()) {
    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->label,
    )));
  }
  $output = drupal_get_form('fb_form_multi_add_invite_form');
  return $output;
}