--- /dev/null
+package de.juplo.yourshouter;
+
+import javax.inject.Inject;
+
+import org.springframework.social.facebook.api.Facebook;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+
+/**
+ * Controller, that handles requests to the root of the application.
+ *
+ * @author Kai Moritz
+ */
+@Controller
+public class ProfileController
+{
+ private final Facebook facebook;
+
+
+ @Inject
+ public ProfileController(Facebook facebook)
+ {
+ this.facebook = facebook;
+ }
+
+
+ @RequestMapping(value = "/profile.html", method = RequestMethod.GET)
+ public String show(Model model)
+ {
+ model.addAttribute("profile", facebook.userOperations().getUserProfile());
+ return "profile";
+ }
+}
<h1>Hello, <span th:text="${user.name}">Some User</span>!</h1>
<ul>
<li><a href="connect/facebookConnected.html" th:href="@{/connect/facebook.html}">Show connection-status</a></li>
+ <li><a href="profile.html" th:href="@{/profile.html}">Show public profile-data</a></li>
</ul>
</body>
</html>
--- /dev/null
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+ <head>
+ <title>Hello Facebook</title>
+ </head>
+ <body>
+ <p>Back <a href="home.html" th:href="@{/}">HOME</a></p>
+ <hr />
+ <h1>Public available profile-data</h1>
+ <ul>
+ <li><strong>ID:</strong> <em th:text="${profile.id}">123456789</em></li>
+ <li><strong>Name:</strong> <em th:text="${profile.name}">Kai Moritz</em></li>
+ <li><strong>First Name:</strong> <em th:text="${profile.firstName}">Kai</em></li>
+ <li><strong>Last Name:</strong> <em th:text="${profile.lastName}">Moritz</em></li>
+ <li><strong>Gender:</strong> <em th:text="${profile.gender}">male</em></li>
+ <li><strong>Verified:</strong> <em th:text="${profile.verified}">true</em></li>
+ <li th:if="${profile.cover}"><strong>Cover:</strong> <img src="" th:src="${profile.cover.source}" alt="1234567" th:alt="${profile.cover.id}" /></li>
+ </ul>
+ </body>
+</html>