(#803)您请求的某些别名不存在:{education-experience-id} Android [英] (#803) Some of the aliases you requested do not exist: {education-experience-id} Android

查看:237
本文介绍了(#803)您请求的某些别名不存在:{education-experience-id} Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to get education detail and work description of user from facebook. I login successfully and get Access token. But I am unable to get details I want

我正在使用的代码:-

    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();
}

任何人都可以回复 我收到错误消息(#803)您请求的某些别名不存在:{education-experience-id}

can anyone please reply I am getting error (#803) Some of the aliases you requested do not exist: {education-experience-id}

推荐答案

最后,通过以下代码,我得到了完整的工作和教育方面的详细信息:

Finally I got full work and education detail by this code:

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();

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

Might help someone ! Happy coding :)

这篇关于(#803)您请求的某些别名不存在:{education-experience-id} Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆