我是 C# 和 Windows Phone 7 开发的新手,在尝试使用Dropnet api 时出现错误:
using DropNet;
namespace Hello
{
public partial class App : Application
{
public PhoneApplicationFrame RootFrame { get; private set; }
public static DropNetClient DropNetClient { get; set; }
public App()
{
InitializeComponent();
InitializePhoneApplication();
DropNetClient = new DropNetClient("api key", "secret");
//I've correct app key and secret inserted here
DropNetClient.GetTokenAsync((userLogin) =>
{
//Dont really need to do anything with userLogin,
//DropNet takes care of it for now
},
(error) =>
{
//Handle error
});
var url = DropNetClient.BuildAuthorizeUrl();
//getting error here
}
}
我得到的错误是
ArgumentNullException was unhandled
Value cannot be null
Parameter name: userLogin
根据http://dkdevelopment.net/what-im-doing/dropnet/代码应该可以工作。请帮忙。