You are here

function fb_feed_action_show_dialog_form in Drupal for Facebook 5.2

File

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

Code

function fb_feed_action_show_dialog_form($values) {

  // Allow user to choose from 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 or Facebook Connect page when the user is logged in.  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['user_message_prompt'] = array(
    '#type' => 'textfield',
    '#title' => t('Prompt'),
    '#description' => t('The label (which could be in the form of a question) that appears above the text box on the Feed form next to the Facebook-provided question, "What\'s on your mind?".'),
    '#default_value' => $values['user_message_prompt'],
  );
  return $form;
}