You are here

function fb_permission_form_fbml in Drupal for Facebook 6.2

for canvas pages and connect pages.

1 call to fb_permission_form_fbml()
fb_permission_user in contrib/fb_permission.module
Implementation of hook_user.

File

contrib/fb_permission.module, line 101
Code pertaining to Facebook's extended permissions. see http://wiki.developers.facebook.com/index.php/Extended_permissions

Code

function fb_permission_form_fbml($fb_app, $map) {
  foreach ($map as $key => $t) {
    $form[$key] = array(
      '#type' => 'markup',
      '#value' => '<fb:prompt-permission perms="' . $key . '">' . t($t, array(
        '%application' => $fb_app->title,
      )) . '<br /></fb:prompt-permission>',
    );
  }

  // Add buttons for boxes and info
  $sections = array(
    'profile',
    'info',
  );
  foreach ($sections as $section) {
    if (fb_is_fbml_canvas()) {
      $form[$section] = array(
        '#type' => 'markup',
        '#value' => '<fb:add-section-button section="' . $section . '" />',
      );
    }
  }
  return $form;
}