function fb_devel_fbu_page in Drupal for Facebook 6.2
Same name and namespace in other branches
- 5.2 fb_devel.module \fb_devel_fbu_page()
- 5 fb_devel.module \fb_devel_fbu_page()
- 6.3 fb_devel.module \fb_devel_fbu_page()
- 7.3 fb_devel.module \fb_devel_fbu_page()
A page which tests function which work with facebook user ids
1 string reference to 'fb_devel_fbu_page'
- fb_devel_menu in ./
fb_devel.module - @file Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.
File
- ./
fb_devel.module, line 238 - Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.
Code
function fb_devel_fbu_page($fbu = NULL) {
if ($fbu) {
$output = "<p>Debug info about facebook id {$fbu}:</p>\n";
$friends = fb_get_friends($fbu);
//dpm($friends, "fb_get_friends($fbu) returned");
$items = array();
foreach ($friends as $_fbu) {
$items[] = l($_fbu, "fb/devel/fbu/{$_fbu}");
}
if (count($items)) {
$output .= "\n<p>Known friends:<ul><li>";
$output .= implode("</li>\n <li>", $items);
$output .= "</li></ul></p>\n\n";
}
$local_friends = fb_user_get_local_friends($fbu);
$items = array();
foreach ($local_friends as $uid) {
$account = user_load(array(
'uid' => $uid,
));
$items[] = theme('username', $account);
}
if (count($items)) {
$output .= "\n<p>Local friends:<ul><li>";
$output .= implode("</li>\n <li>", $items);
$output .= "</li></ul></p>\n\n";
}
}
else {
drupal_set_message(t("You have to specify a facebook user id."), 'error');
}
return $output;
}