/**
  * Facebook authentication
  *
  * @ApiDoc(
  *      resource = "/public/api/authentications/",
  *     description = "Facebook authentication",
  *     statusCodes = {
  *         200 = "Returned when successful",
  *         400 = "Returned when have any error"
  *     },
  *      output={
  *          "class" = "array<Hackathon\WorkBundle\Entity\User>",
  *          "groups" = {"user_detail"}
  *      },
  *      views = {"default"}
  * )
  *
  * @Get("/authentications/facebook/{token}")
  *
  * @View(serializerGroups="user_detail")
  *
  * @param string $token
  * @return User
  */
 public function getAuthenticationFacebookAction($token)
 {
     //Get user
     $facebookUser = FacebookUser::getUserByToken($token);
     $userManager = $this->getUserManager();
     $user = $userManager->findByFacebook($facebookUser);
     return $this->checkEmptyObject($user, 'hackathon.message._user_not_found');
 }