You are here

function fb_actions_ref_fbml_form in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_actions.module \fb_actions_ref_fbml_form()

Implementation of an Action.

This action updates reference FBML. http://developer.facebook.com/documentation.php?v=1.0&method=fbml.setRef...

File

./fb_actions.module, line 182
Actions defined here interact with Facebook's API. This makes it possible to notify facebook of various activities as they happen.

Code

function fb_actions_ref_fbml_form($values) {
  $form['description'] = array(
    '#value' => t('This action will update reference FBML.  See Facebook\'s documentation of the <fb:ref> tag.  Suitable for canvas pages and cron jobs (if infinite session is configured).'),
  );
  $options = fb_get_app_options(TRUE);
  $form['fb_app_nid'] = array(
    '#type' => 'select',
    '#title' => t('Application'),
    '#default_value' => $values['fb_app_nid'],
    '#options' => $options,
    '#description' => t('Log into Facebook as which application?  %current is OK when invoked from canvas pages or cron jobs.', array(
      '%current' => $options[FB_APP_CURRENT],
    )),
  );
  $form['handle'] = array(
    '#type' => 'textfield',
    '#title' => t('Handle'),
    '#default_value' => $values['handle'],
  );
  $form['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Reference FBML'),
    '#default_value' => $values['body'],
    '#description' => t('FBML to write to user\'s profile.<br />The following token will be replaced: !token_help', array(
      '!token_help' => theme('token_help', 'fb_app'),
    )),
  );
  $form['body_filter'] = filter_form($values['body_filter'], NULL, array(
    'body_filter',
  ));
  return $form;
}