You are here

function fb_feed_action_publish_form in Drupal for Facebook 5.2

File

./fb_feed.module, line 681
Helpers for Facebook feeds (http://wiki.developers.facebook.com/index.php/New_Design_Feed_Wall)

Code

function fb_feed_action_publish_form($values) {

  // Allow user to choose amoung all available templates.
  $options = fb_feed_get_template_options();
  $form['description'] = array(
    '#value' => t('Note that this action will only succeed when executed from a Facebook canvas page when the user is logged in, or on non-canvas pages when the local user has authorized offline access.  These are privacy restrictions enforced by the Facebook API.'),
  );
  $form['fb_feed_template_nid'] = array(
    '#type' => 'select',
    '#title' => t('Template'),
    '#default_value' => $values['fb_feed_template_nid'],
    '#options' => $options,
    '#description' => t('Which template will we be using?'),
    '#required' => TRUE,
  );
  $form['token_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use token replacement'),
    '#default_value' => $values['token_enable'],
    '#description' => t('Use token module for template substitution.'),
  );
  $form['hook_help'] = array(
    '#type' => 'markup',
    '#value' => t('In addition to token replacement, <em>hook_fb_feed</em> will be called before Feed.publishUserAction is called.  This hook gives you an oportunity to customize the parameters that will be passed to Facebook, for example to provide values for custom tokens in your template.  Until further documentation is provided, you should look in the code for exactly how these functions are called.'),
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  );
  return $form;
}