Index: fb_user.module
===================================================================
--- fb_user.module	(revision 3491)
+++ fb_user.module	(working copy)
@@ -624,8 +624,7 @@
     $fbu = _fb_user_get_fbu($account->uid);

     if ($fbu) {
-      // The drupal user is a facebook user.  Now, learn more from facebook.
-      $info = fb_users_getInfo(array($fbu));
+      // The drupal user is a facebook user.
       $form['map'] = array(
         '#type' => 'checkbox',
         '#title' => t('Connect to facebook.com'),
@@ -633,36 +632,35 @@
         '#return_value' => $fbu,
         '#description' => '',
       );
-      if (is_array($info[0])) {
-        $data = $info[0];
-        $fb_link = l($data['name'] ? $data['name'] : $fbu,
-                     'http://www.facebook.com/profile.php', array(
-                       'query' => array('id' => $data['uid'])));
-
-        $form['map']['#description'] .=
-          t('Local account !username corresponds to !profile_page on Facebook.com.',
-            array(
-              '!username' => l($account->name, 'user/' . $account->uid),
-              '!profile_page' => $fb_link));
-
-        if (fb_facebook_user() == $fbu) {
-          // The user is currently connected to facebook.  Depending on
-          // config, they may not be able to break the connection.
-          $form['map']['#disabled'] = TRUE;
-          $form['map']['#description'] .= '<br/>' . t('(Checkbox disabled because you are currently connected to facebook.)');
-
+      // Now, learn more from facebook.
+      try {
+        $data = fb_api($fbu, array('access_token' => fb_get_token()));
+        if (count($data)) {
+          $form['map']['#description'] .=
+            t('Local account !username corresponds to !profile_page on Facebook.com.',
+              array(
+                '!username' => l($account->name, 'user/' . $account->uid),
+                '!profile_page' => l($data['name'], $data['link'])));
         }
-        else {
-          $form['map']['#description'] .= '<br/>' . t('Uncheck then click save to delete this connection.');
+      }
+      catch (Exception $e) {
+        fb_log_exception($e, t('Failed to get user data from facebook.'));
+      }

-        }
+      if (fb_facebook_user() == $fbu) {
+        // The user is currently connected to facebook.  Depending on
+        // config, they may not be able to break the connection.
+        $form['map']['#disabled'] = TRUE;
+        $form['map']['#description'] .= '<br/>' . t('(Checkbox disabled because you are currently connected to facebook.)');
       }
+      else {
+        $form['map']['#description'] .= '<br/>' . t('Uncheck then click save to delete this connection.');
+      }
     }

     if (!$fbu) {  // this tells us that a mapping hasn't been created
       if ($user->uid == $account->uid) {
         // Could not obtain the $fbu from an existing map.
-
         $fbu = fb_facebook_user();

         if ($fbu) {  // they are connected to facebook; give option to map
