I am trying to access the user's email from in Spring social sample but the email is always null. On Facebook developer pages it says "you should specify the additional permissions you require using the scope parameter."
There is a setting for authenticated referrals but I didn't see any place to set it for normal Facebook login. Is this passed on client side. If so how do I do it with spring social?
Code:@RequestMapping(value="/signup", method=RequestMethod.GET) public SignupForm signupForm(WebRequest request, Model model) { addNewSearchBean(model); Connection<?> connection = ProviderSignInUtils.getConnection(request); if (connection != null) { UserProfile profile = connection.fetchUserProfile(); System.out.println("user email is "+profile.getEmail()); System.out.println("user name is "+profile.getFirstName() +", "+ profile.getLastName()); ... return SignupForm.fromProviderUser(connection.fetchUserProfile()); } else { return new SignupForm(); } }


Reply With Quote
