public function SocialContentFacebook::globalSettingsForm in Social Content 7.2
The shared global settings form for all Instagram instances.
Return value
array Global settings form.
Overrides SocialContent::globalSettingsForm
File
- modules/
facebook/ social_content_facebook.class.inc, line 65 - Social Content Facebook class.
Class
- SocialContentFacebook
- @file Social Content Facebook class.
Code
public function globalSettingsForm() {
$settings = $this->settings['global'];
$form = parent::globalSettingsForm($settings);
$form['description'] = array(
'#markup' => '<p>' . t('See !link', array(
'!link' => l('developers.facebook.com', 'https://developers.facebook.com/apps'),
)) . '</p>',
);
$form['graph_url'] = array(
'#type' => 'textfield',
'#title' => t('Facebook Graph URL'),
'#description' => t('Do not include a trailing slash. If not sure, use %url', array(
'%url' => 'https://graph.facebook.com',
)),
'#default_value' => isset($settings['graph_url']) ? $settings['graph_url'] : 'https://graph.facebook.com',
'#required' => TRUE,
);
$form['access_token'] = array(
'#type' => 'textfield',
'#title' => t('Access Token'),
'#description' => t('This is required to interact with Facebook. Use %url to generate one.', array(
'%url' => 'https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&&grant_type=client_credentials',
)),
'#default_value' => isset($settings['access_token']) ? $settings['access_token'] : NULL,
'#maxlength' => 300,
'#required' => TRUE,
);
return $form;
}