1 package de.juplo.yourshouter;
3 import javax.inject.Inject;
5 import org.springframework.social.facebook.api.Facebook;
6 import org.springframework.stereotype.Controller;
7 import org.springframework.ui.Model;
8 import org.springframework.web.bind.annotation.RequestMapping;
9 import org.springframework.web.bind.annotation.RequestMethod;
13 * Controller, that handles requests to the root of the application.
18 public class ProfileController
20 private final Facebook facebook;
24 public ProfileController(Facebook facebook)
26 this.facebook = facebook;
30 @RequestMapping(value = "/profile.html", method = RequestMethod.GET)
31 public String show(Model model)
33 model.addAttribute("profile", facebook.userOperations().getUserProfile());