如何使用 Firebase 身份验证获取 Facebook 的用户个人资料 URL?

How to get user profile URL of Facebook with Firebase Authentication?

我按照 Firebase 的文档进行 Facebook 登录,它有效,但我没有看到任何与 Facebook 用户个人资料相关的内容 link,我是不是遗漏了什么?

Firebase 文档中的代码。

import { getAuth, signInWithPopup, FacebookAuthProvider } from "firebase/auth";

const auth = getAuth();
signInWithPopup(auth, provider)
  .then((result) => {
    // The signed-in user info.
    const user = result.user;
    // I don't see any properties in user relate with user profile link of Facebook

    // This gives you a Facebook Access Token. You can use it to access the Facebook API.
    const credential = FacebookAuthProvider.credentialFromResult(result);
    const accessToken = credential.accessToken;

    // ...
  })
  .catch((error) => {
    console.log(error.message)

    // ...
  });

没有这样的 URL 提供。我建议查看 documentation for the User interface and its UserInfo parent interface 以了解在用户登录后您可以访问哪些类型的数据。