Facebook graph api 当从Facebook请求用户链接权限时,GraphRequest.NewMereRequest()返回一个空对象

Facebook graph api 当从Facebook请求用户链接权限时,GraphRequest.NewMereRequest()返回一个空对象,facebook-graph-api,firebase-authentication,facebook-authentication,Facebook Graph Api,Firebase Authentication,Facebook Authentication,我让Firebase在我的应用程序中登录Facebook,正如Firebase文档中所建议的: loginButton.setPermissions("email", "public_profile"); 调用GraphRequest.NewMereRequest()时,我请求用户链接权限,如下所示: Bundle parameters = new Bundle(); // Need special permiss

我让Firebase在我的应用程序中登录Facebook,正如Firebase文档中所建议的:

        loginButton.setPermissions("email", "public_profile");
调用GraphRequest.NewMereRequest()时,我请求用户链接权限,如下所示:

                Bundle parameters = new Bundle();
                // Need special permission from Faceook in order to get this data. Apply after we've settled on a new name for the app.
                parameters.putString("fields", "id, first_name, last_name, email, gender, birthday, timezone, picture, locale, user_link, age_range");
                request.setParameters(parameters);
                request.executeAsync();
但是当GraphRequest.newMeRequest()完成时,它返回一个空对象。如果我在权限请求中遗漏了user\u链接,则不会发生这种情况

调用GraphRequest.newMeRequest()时,我请求用户链接权限,如下所示

您不是在那里请求权限,而是在请求字段

该字段名为
link
,而不是
user\u link


您需要使用
loginButton.setPermissions
请求权限,然后通过正确的名称请求该字段。

!非常感谢!