function fb_opengraph_user_view in Drupal for Facebook 7.4
Implements hook_user_view().
File
- ./
fb_opengraph.module, line 380 - Open Graph Helpers
Code
function fb_opengraph_user_view($account, $view_mode, $langcode) {
if ($view_mode == 'full') {
// Add smart default tags.
$tags = fb_opengraph_get_tags();
if (!isset($tags['og:type']) && variable_get(FB_OPENGRAPH_VAR_SMART_TAGS, TRUE)) {
fb_opengraph_set_tag('og:type', 'profile');
// http://developers.facebook.com/docs/beta/opengraph/objects/builtin/
fb_opengraph_set_tag('og:url', url('user/' . $account->uid, array(
'absolute' => TRUE,
)), FALSE);
fb_opengraph_set_tag('profile:username', $account->name, FALSE);
}
}
}