Ejemplo n.º 1
0
        public ActionResult Index()
        {
            // Making sure the application is configured correctly and the application is called from a canvas
            // Delete this code once this is done
            try
            {
                var appId     = _applicationSettings.AppId;
                var appSecret = _applicationSettings.AppSecret;
            }
            catch (ConfigurationErrorsException)
            {
                return(Redirect("/landing"));
            }

            if (_platformTokenProvider.Get() == null)
            {
                return(Redirect("/landing"));
            }

            var currentUser          = _usersApi.Current();
            var currentUserFollowing = _usersApi.GetFollowing(currentUser.Id);

            return(View(ToModel(currentUser, currentUserFollowing)));
        }