function fb_devel_page in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 fb_devel.module \fb_devel_page()
- 6.3 fb_devel.module \fb_devel_page()
- 6.2 fb_devel.module \fb_devel_page()
- 7.4 fb_devel.module \fb_devel_page()
- 7.3 fb_devel.module \fb_devel_page()
Provides a page with useful debug info.
1 string reference to 'fb_devel_page'
File
- ./
fb_devel.module, line 81
Code
function fb_devel_page() {
global $fb, $fb_app;
global $user;
if ($_REQUEST['require_login']) {
$fb
->require_login();
}
if ($fb) {
// These will work in a canvas page.
drupal_set_message("in_fb_canvas returns " . $fb
->in_fb_canvas());
drupal_set_message("get_loggedin_user returns " . $fb
->get_loggedin_user());
drupal_set_message("current_url returns " . $fb
->current_url());
drupal_set_message("base_url: " . $GLOBALS['base_url']);
drupal_set_message("base_path: " . $GLOBALS['base_path']);
drupal_set_message("url() returns: " . url());
drupal_set_message("session_key is " . $fb->api_client->session_key);
}
if ($fbu = fb_get_fbu($user)) {
$path = "fb/devel/fbu/{$fbu}";
drupal_set_message(t("Learn more about the current user at !link", array(
'!link' => l($path, $path),
)));
}
dpm(fb_get_fbu($user), 'Facebook user via fb_get_fbu');
//dpm($user, "Local user " . theme('username', $user));
if ($GLOBALS['fb_connect_apikey']) {
drupal_set_message("fb_connect_apikey = " . $GLOBALS['fb_connect_apikey']);
}
dpm($_COOKIE, 'cookie');
dpm($_REQUEST, "Request");
//dpm($fb_app, "fb_app");
drupal_set_message("session_id returns " . session_id());
//dpm($_SESSION, "session:");
return "This is the facebook debug page.";
}