function facebook_pull_settings in Facebook Pull 7.3
Same name and namespace in other branches
- 6 facebook_pull.module \facebook_pull_settings()
- 7 facebook_pull.module \facebook_pull_settings()
- 7.2 facebook_pull.module \facebook_pull_settings()
Form: Administration page settings.
1 string reference to 'facebook_pull_settings'
- facebook_pull_menu in ./
facebook_pull.module - Implements hook_menu().
File
- ./
facebook_pull.module, line 133 - Facebook Pull Module for getting content from Facebook graph.
Code
function facebook_pull_settings($form_state) {
$form = array();
$application_id = l(t('Application ID'), 'https://developers.facebook.com/apps');
$form['facebook_pull_app_id'] = array(
'#type' => 'textfield',
'#title' => t('App ID'),
'#default_value' => t(variable_get('facebook_pull_app_id', '')),
'#description' => t('Unique !application_id for your facebook app.', array(
'!application_id' => $application_id,
)),
);
$form['facebook_pull_app_secret'] = array(
'#type' => 'textfield',
'#title' => t('App Secret'),
'#default_value' => t(variable_get('facebook_pull_app_secret', '')),
'#description' => t('Your sites app secret.'),
);
$graph_link = l(t('Graph ID'), 'http://developers.facebook.com/docs/reference/api/');
$form['facebook_pull_graph_id'] = array(
'#type' => 'textfield',
'#title' => t('Graph ID'),
'#default_value' => t(variable_get('facebook_pull_graph_id', '')),
'#description' => t('The !graph_id of the page, user, or group.', array(
'!graph_id' => $graph_link,
)),
);
$form['facebook_pull_object_type'] = array(
'#type' => 'textfield',
'#title' => t('Object type'),
'#default_value' => t(variable_get('facebook_pull_object_type', '')),
'#description' => t('The object type to pull. This is most likely going to be "feed". Facebook API documentation may offer other endpoints such as "posts" or "tagged". They are not thoroughly tested.'),
);
$form['facebook_pull_limit'] = array(
'#type' => 'textfield',
'#title' => t('Limit'),
'#size' => 5,
'#default_value' => t(variable_get('facebook_pull_limit', '')),
'#description' => t('How many posts to show in the box by default. If you have not entered a default limit here then it will default to 10.'),
);
$form['facebook_pull_fields'] = array(
'#type' => 'checkboxes',
'#title' => t('Fields to retrieve from Facebook'),
'#options' => _facebook_pull_default_options(),
'#default_value' => variable_get('facebook_pull_fields', array_keys(_facebook_pull_default_options())),
);
return system_settings_form($form);
}