diff --git a/src/utils/facebook-graph.ts b/src/utils/facebook-graph.ts index e8980a4f..fd2bbd06 100644 --- a/src/utils/facebook-graph.ts +++ b/src/utils/facebook-graph.ts @@ -14,8 +14,8 @@ * 不引入 Facebook SDK(window.FB)—— 减少前端 bundle 体积,Graph API * 单次 HTTP 调用即可拿到所有字段。SDK 加载慢、还要管 init。 * - * 端点:`https://graph.facebook.com/me?fields=id,name,email,picture.type=large&access_token=...` - * - `picture.type=large` 返回 ~200px 头像 URL(默认 square 50px 太小) + * 端点:`https://graph.facebook.com/me?fields=id,name,email,picture.type(large)&access_token=...` + * - `picture.type(large)` 返回 ~200px 头像 URL(默认 square 50px 太小) * - 不指定 version 走最新稳定版 * - 不需要 appId / appSecret(accessToken 自身就是凭证) */ @@ -31,9 +31,9 @@ const GRAPH_ME_URL = "https://graph.facebook.com/me"; /** * 拉取字段集合: * - id / name / email —— 给本地 FacebookUserData DTO - * - picture.type=large —— 头像 URL(默认 square 50px 太小) + * - picture.type(large) —— 头像 URL(默认 square 50px 太小) */ -const FIELDS = "id,name,email,picture.type=large"; +const FIELDS = "id,name,email,picture.type(large)"; /** * 用 accessToken 调 Facebook Graph `/me` 拉用户资料。