// GET: Home public ActionResult Index() { AccountDAO dao = new AccountDAO(); List <AccountDO> getAll = dao.Carregar(); var accessToken = _token; var facebookClient = new FacebookClient(); var facebookService = new FacebookService(facebookClient); var account = facebookService.GetAccount(accessToken); AccountDO accDO = new AccountDO() { Id = account.Id, Name = account.Name, FirstName = account.FirstName, LastName = account.LastName }; dao.Salvar(accDO); ViewBag.AccountId = account.Id; ViewBag.AccountName = account.Name; return(View()); }