(#803)您请求的某些别名不存在:{education-experience-id} Android

Aka*_*ore 5 social android facebook social-media facebook-graph-api

我正在尝试从Facebook获取用户的教育详细信息和工作描述。我成功登录并获得访问令牌。但我无法获取所需的详细信息

我正在使用的代码:-

    public void getUserExpandEducation() {

    new GraphRequest(
            AccessToken.getCurrentAccessToken(),
        "/{education-experience-id}",  //"/{user_education_history}",//  
            null,
            HttpMethod.GET,
            new GraphRequest.Callback() {
                public void onCompleted(GraphResponse response) {
                    Log.d("fb response",response.toString());
                }
            }
    ).executeAsync();
}
Run Code Online (Sandbox Code Playgroud)

谁能回答我收到错误消息(#803)您请求的某些别名不存在:{education-experience-id}

Aka*_*ore 4

最后我通过这段代码获得了完整的工作和教育细节:

GraphRequest request = GraphRequest.newMeRequest(
            accessToken,
            new GraphRequest.GraphJSONObjectCallback() {
                @Override
                public void onCompleted(
                        JSONObject object,
                        GraphResponse response) {

                    FirstNameSocial = object.optString("first_name");
                    LastNameSocial = object.optString("last_name");
                    GenderSocial = object.optString("gender");
                    EmailSocial = object.optString("email", "");
                    id = object.optString("id");


                    if (!EmailSocial.equals("")) {
                        login_type = Config.Login_Type_facebook;
                        callAPI(EmailSocial, id, "");

                    } else {
                        Toast.makeText(getApplicationContext(), "Permision Denied", Toast.LENGTH_LONG)
                                .show();
                    }

                }
            });

    Bundle parameters = new Bundle();
    parameters.putString("fields", "id,name,email,birthday,gender,first_name,last_name,picture,education,work");
    request.setParameters(parameters);
    request.executeAsync();
Run Code Online (Sandbox Code Playgroud)

可能会帮助某人!快乐编码:)