You are here

function fb_post_entity_publish_form in Drupal for Facebook 7.4

1 string reference to 'fb_post_entity_publish_form'
fb_post_entity_page in ./fb_post.module

File

./fb_post.module, line 622

Code

function fb_post_entity_publish_form($form, &$form_state, $entity) {
  if ($token = fb_get_admin_token()) {
    $form['fb'] = array(
      '#type' => 'fieldset',
      '#title' => t('Post to Facebook'),
      '#description' => t('Post to facebook using site-wide settings'),
    );
    $form['fb']['fb_post_settings'] = _fb_post_node_settings_form(array(), $form_state, $entity, $token);
    $form['fb']['fb_post_settings']['status'] = array(
      '#type' => 'value',
      '#value' => 1,
    );
    $form['fb']['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Post to Facebook'),
    );
    $form['#entity'] = $entity;
  }
  return $form;
}