Created
April 27, 2016 14:36
-
-
Save asouza/3c1adea11db7bd6e9404c5ee7a9e7835 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@Transactional | |
public class FacebookLoginController { | |
@Autowired | |
private Facebook facebook; | |
@RequestMapping(value = "/facebook/login", method = RequestMethod.GET) | |
public ModelAndView handleFacebookLogin(HttpServletResponse response) { | |
User profile = facebook.fetchObject("me", User.class, "id", "name", "link", "email"); | |
System.out.println(profile.getName()); | |
return new ModelAndView("redirect:/dashboard"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment