function social_content_facebook_settings_form in Social Content 7
Social content type Facebook settings form.
Parameters
$form: Form API array, to be modified with additional settings.
$social_content_type: Social content type object
2 string references to 'social_content_facebook_settings_form'
- hook_social_content_info in ./
social_content.api.php - Define social content types.
- social_content_facebook_social_content_info in modules/
facebook/ social_content_facebook.module - @file Social Content: Facebook module.
File
- modules/
facebook/ social_content_facebook.module, line 36 - Social Content: Facebook module.
Code
function social_content_facebook_settings_form(&$form, $social_content_type, $settings) {
if ($social_content_type['name'] = 'facebook') {
$form['user_id'] = array(
'#type' => 'textfield',
'#title' => t('Facebook Page User ID'),
'#description' => t('Visit http://graph.facebook.com/<page_path> to obtain the user id.'),
'#default_value' => $settings['user_id'],
'#required' => TRUE,
);
$form['graph_url'] = array(
'#type' => 'textfield',
'#title' => t('Facebook Graph URL'),
'#description' => t('The url to use to get facebook posts.'),
'#default_value' => $settings['graph_url'],
'#required' => TRUE,
);
$form['access_token'] = array(
'#type' => 'textfield',
'#title' => t('Access Token'),
'#description' => t('This is required to interact with facebook. Use https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&&grant_type=client_credentials to generate one.'),
'#default_value' => $settings['access_token'],
'#maxlength' => 255,
'#required' => TRUE,
);
$form['min_resolution'] = array(
'#type' => 'textfield',
'#title' => t('Minimum image resolution'),
'#description' => t('Only posts that have images that meet the minimum image resolution will be imported. WIDTHxHEIGHT'),
'#default_value' => $settings['min_resolution'],
'#required' => TRUE,
);
}
}