function fb_canvas_fb_admin in Drupal for Facebook 6.2
Same name and namespace in other branches
- 6.3 fb_canvas.admin.inc \fb_canvas_fb_admin()
- 7.3 fb_canvas.admin.inc \fb_canvas_fb_admin()
Implementation of hook_fb_admin().
File
- ./
fb_canvas.admin.inc, line 12 - Admin pages and forms for canvas apps.
Code
function fb_canvas_fb_admin($op, $data, &$return) {
$fb = isset($data['fb']) ? $data['fb'] : NULL;
$fb_app = isset($data['fb_app']) ? $data['fb_app'] : NULL;
if ($op == FB_ADMIN_OP_SET_PROPERTIES) {
// Compute properties which we can set automatically.
if (function_exists('fb_url_inbound_alter')) {
$callback_url = url('', array(
'absolute' => TRUE,
)) . FB_SETTINGS_CB . '/' . $fb_app->label . '/';
}
else {
// Paving the way to make URL alters optional.
$callback_url = url('', array(
'absolute' => TRUE,
));
}
$return['callback_url'] = $callback_url;
}
elseif ($op == FB_ADMIN_OP_LIST_PROPERTIES) {
$return[t('Callback URL')] = 'callback_url';
}
}