function fb_admin_default_token_form in Drupal for Facebook 7.4
File
- ./
fb.admin.inc, line 146
Code
function fb_admin_default_token_form($form, &$form_state) {
// Explanation of form.
$markup = array(
'#type' => 'markup',
'#prefix' => '<p>',
'#suffix' => '</p>',
);
$form['description']['#weight'] = -20;
$form['description'][] = array(
'#markup' => t('This form configures an <em>access token</em> for advanced integration between this website and Facebook.'),
) + $markup;
$form['description'][] = array(
'#markup' => t('Save a token if you want the website to interact with Facebook when the current user is not connected. For example, to cross-post content to a Facebook page while the author is not logged into Facebook.'),
) + $markup;
// The form to create a new token is mostly the same as the form to replace a token.
$form = fb_admin_replace_token_form($form, $form_state, FB_VAR_ADMIN_ACCESS_TOKEN, array(
'replace' => FALSE,
'scope' => array(
// Extended permissions.
'manage_pages',
'publish_actions',
),
));
$form['submit']['#value'] = t('Save default token');
drupal_set_title(t('Site-Wide Default Access Token'));
return $form;
}