Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

Code I am using for it :-

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

can anyone please reply

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

like image 357
Akanksha Rathore Avatar asked May 27 '16 09:05

Akanksha Rathore


People also ask

What are () called in English?

Parentheses are a pair of punctuation marks that are most often used to add additional nonessential information or an aside to a sentence. Parentheses resemble two curved vertical lines: ( ). A single one of these punctuation marks is called a parenthesis.

What is a parenthesis example?

Parenthesis is the use of a phrase, word or sentence that's added into writing as extra information or an afterthought. It's punctuated by brackets, commas or dashes. For example, 'his favourite team - whom he had followed since the age of five - was Rockingham Rovers'.

What is this bracket called <>?

The four main paired punctuation symbols are the bracket (or square bracket; also called parenthesis in British English), the parenthesis (plural: parentheses), the brace (curly bracket in British English), and the inequality sign (pointy bracket).

What are the fancy parentheses called?

Curly brackets { and } are also known as "curly braces" or simply "braces" (UK and US), "definite brackets", "swirly brackets", "birdie brackets", "French brackets", "Scottish brackets", "squirrelly brackets", "gullwings", "seagulls", "squiggly brackets", "twirly brackets", "Tuborg brackets" (DK), "accolades" (NL), " ...


2 Answers

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 :)

like image 154
Akanksha Rathore Avatar answered Sep 25 '22 00:09

Akanksha Rathore


Make sure you authorized with that permission: user_education_history

API call to get a list of education IDs: https://developers.facebook.com/tools/explorer/?method=GET&path=me%3Ffields%3Deducation

In your code, you need to replace the following string with one of the resulting education IDs: {education-experience-id}

For example:

new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/12345",
        null,
        HttpMethod.GET,
        new GraphRequest.Callback() {
            public void onCompleted(GraphResponse response) {
                Log.d("fb response",response.toString());
            }
        }
).executeAsync();
like image 35
andyrandy Avatar answered Sep 26 '22 00:09

andyrandy