You are here

function fb_user_token_values in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_user.module \fb_user_token_values()
  2. 6.3 fb_user.module \fb_user_token_values()
  3. 6.2 fb_user.module \fb_user_token_values()
  4. 7.3 fb_user.module \fb_user_token_values()

File

./fb_user.module, line 858
This module allows Drupal user records to be associated with Facebook user ids. It can create local user accounts when Facebook users visit an application's canvas pages.

Code

function fb_user_token_values($type = 'all', $object = NULL) {
  if ($type == 'fb_app' && $object) {
    $fb_app = $object;
    global $user;
    $fbu = _fb_user_get_fbu($user->uid, $fb_app);
    if ($fbu) {
      $values['fb-app-user-fbu'] = $fbu;
      $values['fb-app-user-name'] = 'TODO XXX';
      $values['fb-app-user-name-fbml'] = '<fb:name uid="' . $fbu . '" />';
      $values['fb-app-profile-url'] = 'http://www.facebook.com/profile.php?id=' . $fbu;
    }
  }
  return $values;
}