public ActionResult Auth(string code)
 {
     OAuth auth = new OAuth("e324954800fd49e28ed905fd35c40581", "http://localhost:10438/home/auth");
     string msg;
     if (auth.GetAccessTokenByCode(code, out msg))
     {
         Client client = new Client(auth);
         Session["client"] = client;
     }
     ViewBag.msg = msg;
     return View();
 }
 public Client(OAuth oauth)
 {
     this.OAuth = oauth;
     this.API = new APIResource(this);
 }
        //
        // GET: /Home/

        public ActionResult Index()
        {
            OAuth auth = new OAuth("e324954800fd49e28ed905fd35c40581", "http://localhost:10438/home/auth");
            ViewBag.url = auth.GetAuthorizeURL();
            return View();
        }
示例#4
0
 public Client(OAuth oauth)
 {
     this.OAuth = oauth;
     this.API   = new APIResource(this);
 }