function facebook_wall_page_info in Facebook Wall 7
Admin configure form for user Page information.
1 string reference to 'facebook_wall_page_info'
- facebook_wall_menu in ./
facebook_wall.module - Implements hook_menu().
File
- ./
facebook_wall.admin.inc, line 306 - Contains the administrative functions of the Facebook Wall fetcher module.
Code
function facebook_wall_page_info() {
$page_detail = _facebook_wall_page_info_array();
if ($page_detail != FALSE) {
$img_url = _facebook_wall_profile_picture($page_detail->id);
$form['fbw'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#title' => t('Facebook User Details'),
);
$header = array(
'key' => array(
'data' => t('Key'),
),
'value' => array(
'data' => t('Value'),
),
);
// Putting FB array content into table.
$rows = array(
isset($img_url) ? array(
'Profile Picture',
'<img src="' . $img_url . '" />',
) : NULL,
array(
'User ID',
$page_detail->id,
),
array(
'Full Name',
'value' => $page_detail->name,
),
isset($page_detail->about) ? array(
'About us',
$page_detail->about,
) : NULL,
isset($page_detail->link) ? array(
'Profile URL',
l($page_detail->link, $page_detail->link),
) : NULL,
isset($page_detail->category) ? array(
'Category',
$page_detail->category,
) : NULL,
isset($page_detail->fan_count) ? array(
'Facebook Likes',
$page_detail->fan_count,
) : NULL,
isset($page_detail->website) ? array(
'Website',
$page_detail->website,
) : NULL,
isset($page_detail->cover->source) ? array(
'Profile Picture',
'<img src="' . $page_detail->cover->source . '" />',
) : NULL,
);
$form['fbw']['user_table'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
'#empty' => t('No content available.'),
);
$form['permissions'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#title' => t('Access token User permissions'),
);
$permissions_header = array(
'key' => array(
'data' => t('Key'),
),
'value' => array(
'data' => t('Value'),
),
);
$rows = array();
$access_token = _facebook_wall_access_token_permission_info_array();
if (isset($access_token->data)) {
foreach ($access_token->data as $permission) {
$rows[] = array(
'key' => t($permission->permission),
'value' => t($permission->status),
);
}
}
$form['permissions']['access_permission'] = array(
'#theme' => 'table',
'#header' => $permissions_header,
'#rows' => $rows,
'#empty' => t('No content available.'),
);
// print '<pre>'; print_r($access_token->data); print '</pre>';
return $form;
}
}