{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2683","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2683/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2683/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2683/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2683","id":176056964,"number":2683,"title":"Parse Server FACEBOOK Error on Signup users","user":{"login":"maravilhosinga","id":9404820,"avatar_url":"https://avatars.githubusercontent.com/u/9404820?v=3","gravatar_id":"","url":"https://api.github.com/users/maravilhosinga","html_url":"https://github.com/maravilhosinga","followers_url":"https://api.github.com/users/maravilhosinga/followers","following_url":"https://api.github.com/users/maravilhosinga/following{/other_user}","gists_url":"https://api.github.com/users/maravilhosinga/gists{/gist_id}","starred_url":"https://api.github.com/users/maravilhosinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maravilhosinga/subscriptions","organizations_url":"https://api.github.com/users/maravilhosinga/orgs","repos_url":"https://api.github.com/users/maravilhosinga/repos","events_url":"https://api.github.com/users/maravilhosinga/events{/privacy}","received_events_url":"https://api.github.com/users/maravilhosinga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-09T16:54:48Z","updated_at":"2016-09-09T17:02:01Z","closed_at":null,"body":"`List<String> mPermissions = Arrays.asList(\"public_profile\",\"email\", \"user_about_me\", \"user_birthday\", \"user_friends\", \"user_hometown\", \"user_location\");\r\n\r\n                    ParseFacebookUtils.logInWithReadPermissionsInBackground(LoginActivity.this, mPermissions, new LogInCallback() {\r\n                        @Override\r\n                        public void done(ParseUser parseUser, ParseException err) {\r\n\r\n                            final User user = (User) parseUser;\r\n\r\n                            if (user == null) {\r\n                                Log.d(\"MyApp\", \"Uh oh. The user cancelled the Facebook login.\");\r\n                            } else if (user.isNew()) {\r\n\r\n                                Log.d(\"MyApp\", \"User signed up and logged in through Facebook!\");\r\n\r\n                                Bundle parameters = new Bundle();\r\n                                parameters.putString(\"fields\", \"id,picture.type(large),email,name,username,user_birthday,user_hometown,user_about_me,user_location,user_friends\");\r\n                                new GraphRequest(\r\n                                        AccessToken.getCurrentAccessToken(), \"/me\", parameters, HttpMethod.GET, new GraphRequest.Callback() {\r\n                                            public void onCompleted(GraphResponse response) {\r\n         /* handle the result */\r\n                                                try {\r\n                                                     // ERROR is begining here\r\n                                                     String email = response.getJSONObject().getString(\"email\");\r\n                                                     String name = response.getJSONObject().getString(\"name\");\r\n                                                     String username = response.getJSONObject().getString(\"username\");//  String birtday = response.getJSONObject().getString(\"user_birthday\");\r\n                                                     String hometown = response.getJSONObject().getString(\"user_hometown\");\r\n                                                     String description = response.getJSONObject().getString(\"user_about_me\");\r\n                                                     String currentcity = response.getJSONObject().getString(\"user_location\");\r\n                                                     String age = response.getJSONObject().getString(\"age_range\");\r\n\r\n                                                    //ParseInstallation.getCurrentInstallation().put(\"user\", user);\r\n                                                    ParseInstallation.getCurrentInstallation().saveInBackground();\r\n\r\n                                                    user.setNoVip();\r\n                                                    user.setNickname(name);\r\n                                                    user.setInstallation(ParseInstallation.getCurrentInstallation());\r\n                                                    user.setEmail(email);\r\n                                                    //mCurrentUser.setBirthDay(birtday);\r\n                                                    user.setAge(Integer.parseInt(age));\r\n                                                    user.setUsername(username);\r\n                                                    user.setDist(100);\r\n                                                    user.setDescription(description);\r\n                                                    user.setAtualCity(currentcity);\r\n                                                    user.setBornCity(hometown);\r\n\r\n                                                    JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\r\n                                                    JSONObject data = picture.getJSONObject(\"data\");\r\n                                                    //  Returns a 50x50 profile picture\r\n                                                    String pictureUrl = data.getString(\"url\");\r\n                                                    new ProfilePhotoAsync(pictureUrl).execute();\r\n                                                } catch (JSONException e) {\r\n                                                    e.printStackTrace();\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                ).executeAsync();`\r\n\r\nis signing up the user, but getting error on get user information \r\n\r\n java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.getString(java.lang.String)' on a null object reference"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/245974552","html_url":"https://github.com/ParsePlatform/parse-server/issues/2683#issuecomment-245974552","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2683","id":245974552,"user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T17:02:01Z","updated_at":"2016-09-09T17:02:01Z","body":"That seems to be a problem with the FB request's JSON response more than the parse login right?"}}
{"actor":{"display_login":"flovilmart"}}