コード例 #1
0
        public async Task <IActionResult> Get(string token)
        {
            using (var service = new FaceBookService(this.configuration)){
                var result = await service.GetMeAsync(token);

                return(Json(result));
            }
        }
コード例 #2
0
ファイル: UserController.cs プロジェクト: jcpc91/fb-loginpage
        public async Task <IActionResult> Post([FromForm] string token)
        {
            using (var fbservice = new FaceBookService(this.configuration)){
                Models.User me = await fbservice.GetMeAsync(token);

                var    userservice = new UserService(this.configuration);
                string tokenapp    = userservice.GenerateToken(me);
                return(Json(tokenapp));
            }
        }