gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:27:06 24 4
gpt4 key购买 nike

我正在尝试从 facebook 获取用户的教育细节和工作描述。我成功登录并获得访问 token 。但是我无法得到我想要的细节

我正在使用的代码:-

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

谁能回复一下

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

最佳答案

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

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

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

关于android - (#803) 您请求的某些别名不存在 : {education-experience-id} Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37479365/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com