Unable to get work info at Facebook Login android -


i have integrated facebook login in app. want education , work history of user. have got permission facebook, not getting data in response.

below screenshots of permissions:

app taking permissions

facebook review page

below code login:

facebooklogin.setreadpermissions(arrays.aslist("email","user_work_history"));  facebooklogin.registercallback(callbackmanager, new facebookcallback<loginresult>() {         @override         public void onsuccess(loginresult loginresult) {             graphrequest request = graphrequest.newmerequest(loginresult.getaccesstoken(), new graphrequest.graphjsonobjectcallback() {                 @override                 public void oncompleted(jsonobject object, graphresponse response) {                     log.i("loginactivity", response.tostring());                     // facebook data login                     bundle bfacebookdata = getfacebookdata(object);                   }             });              bundle parameters = new bundle();             parameters.putstring("fields", "id, first_name, last_name, email,gender, birthday, location"); // parĂ¡metros que pedimos facebook             request.setparameters(parameters);             request.executeasync();     private bundle getfacebookdata(jsonobject object) {      try {         bundle = new bundle();         string id = object.getstring("id");          try {             url profile_pic = new url("https://graph.facebook.com/" + id + "/picture?width=200&height=150");             log.i("profile_pic", profile_pic + "");             bundle.putstring("profile_pic", profile_pic.tostring());          } catch (malformedurlexception e) {             e.printstacktrace();             return null;         }          bundle.putstring("idfacebook", id);         if (object.has("first_name"))             bundle.putstring("first_name", object.getstring("first_name"));         if (object.has("last_name"))             bundle.putstring("last_name", object.getstring("last_name"));         if (object.has("email"))             bundle.putstring("email", object.getstring("email"));         if (object.has("gender"))             bundle.putstring("gender", object.getstring("gender"));         if (object.has("birthday"))             bundle.putstring("birthday", object.getstring("birthday"));         if (object.has("location"))             bundle.putstring("location", object.getjsonobject("location").getstring("name"));         system.out.println("bundleee: "+bundle);         return bundle;     } catch (jsonexception e) {         e.printstacktrace();     }     return bundle; } 

and response getting facebook

{response:  responsecode: 200, graphobject: {"id":"635531373278990","first_name":"prakhar","last_name":"srivastava","email":"srivastava.prakhar91@gmail.com","gender":"male"}, error: null} 

i not getting work , education related data, unable find out wrong.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)