function fb_actions_profile_fbml_form in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 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 51 - 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 Box FBML'),
'#default_value' => $values['body'],
'#description' => t('FBML to write to user\'s profile box. 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',
));
$form['profile_main'] = array(
'#type' => 'textarea',
'#title' => t('Main Profile Box'),
'#default_value' => $values['profile_main'],
'#description' => t('FBML for the <a href=!url>narrow profile box</a> on the Wall and Info tabs page.', array(
'!url' => 'http://wiki.developers.facebook.com/index.php/New_Design_Narrow_Boxes',
)),
);
$form['mobile_profile'] = array(
'#type' => 'textarea',
'#title' => t('Mobile Profile Box'),
'#default_value' => $values['mobule_profile'],
'#description' => t('FBML intended for mobile devices.'),
);
return $form;
}