function fb_actions_profile_fbml_form in Drupal for Facebook 5
Same name and namespace in other branches
- 5.2 fb_actions.module \fb_actions_profile_fbml_form()
Implementation of an Action. See Actions module.
This action updates a user's profile FBML.
File
- ./
fb_actions.module, line 148 - 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_profile_fbml_form($values) {
$options = fb_get_app_options(TRUE);
$form['description'] = array(
'#value' => t('This action will update the current user\'s Facebook profile. Suitable for canvas pages and cron jobs (if infinite session is configured).'),
);
$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['body'] = array(
'#type' => 'textarea',
'#title' => t('Profile FBML'),
'#default_value' => $values['body'],
'#description' => t('FBML to write to user\'s profile. Make sure to choose an input filter that allows FBML!<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;
}