【发布时间】:2014-03-15 22:05:09
【问题描述】:
我做了很多研究,但找不到解决问题的方法。我正在使用 dropNet API 构建一个保管箱客户端,但是在尝试获取访问令牌时出现异常。
这是我的代码:
var client = new DropNetClient("KEY", "SECRET");
client.GetToken();
var url = client.BuildAuthorizeUrl();
Uri targetUri = new Uri(url);
webBrowser.Navigate(targetUri);
//the exception raise here because i call the getAccessToken too early
var accessToken = client.GetAccessToken();
我知道我必须将用户重定向到网络浏览器,以便他可以授权应用程序,然后我应该调用 getAccessToken(),问题是如果有人可以帮助我,我不知道该怎么做...
谢谢
【问题讨论】:
标签: c# .net visual-studio-2010 oauth dropnet