首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ArgumentNullException未处理

ArgumentNullException未处理
EN

Stack Overflow用户
提问于 2012-04-16 22:55:26
回答 1查看 426关注 0票数 1

我是C#和Windows phone7开发的新手,在尝试使用Dropnet应用程序接口时,我遇到了一个错误:

代码语言:javascript
复制
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/,代码应该可以工作。请帮帮忙。

EN

回答 1

Stack Overflow用户

发布于 2012-04-16 23:30:36

引用自您提供的链接:

代码语言:javascript
复制
_client = new DropNetClient("API KEY", "API SECRET", "USER TOKEN", "USER SECRET");
// OR
_client = new DropNetClient("API KEY", "API SECRET");
_client.UserLogin = new UserLogin { Token = "USER TOKEN", Secret = "USER SECRET" };

你错过了UserLogin初始化。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10176528

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档