public async Task <ActionResult> Get(string id)
        {
            CommunityService service = CommunityService.GetInstance();
            var res = await service.GetByNameAsync(id);

            if (res.Success)
            {
                var principal = await Request.GetOwinContext().Authentication.AuthenticateAsync("OAuth");

                if (principal == null)
                {
                    ViewBag.token = "none";
                }
                else
                {
                    var token = principal.Identity.FindFirst("access_token").Value;
                    ViewBag.token = token;
                }

                ViewBag.hasEvents  = [email protected] != 0 ? true : false;
                ViewBag.hasNotices = res.Result.notice.Count != 0 ? true : false;
                ViewBag.Owner      = res.Result.admins.Any(u => u.id == User.Identity.GetUserId());
                ViewBag.Twitter    = getCommunityTwitterFromDB(res.Result);
                res.Result.@event  = [email protected](x => x.initDate).Reverse().ToList();
                res.Result.notice  = res.Result.notice.OrderBy(x => x.initialDate).Reverse().ToList();

                return(View(res.Result));
            }
            //mandar no viewBag a mensagem de erro para depois ser apresentada na view do Index

            ViewBag.Error        = true;
            ViewBag.ErrorMessage = res.Message;
            return(RedirectToAction("index"));
        }