C# 使用Twitter Api v1.1在windows Phone应用程序中获取Twitter主页时间线引发错误

C# 使用Twitter Api v1.1在windows Phone应用程序中获取Twitter主页时间线引发错误,c#,twitter,windows-phone,C#,Twitter,Windows Phone,我正在尝试将Twitter主页时间线上的最新推文发送到我的Windows Phone应用程序 这是我的密码: public void LoadData() { WebClient tweetclient = new WebClient(); string purl = string.Format("https://api.twitter.com/1.1/statuses/home_timeline.json?screen_name={0}&count=10", App

我正在尝试将Twitter主页时间线上的最新推文发送到我的Windows Phone应用程序

这是我的密码:

public void LoadData()
{
     WebClient tweetclient = new WebClient();
     string purl = string.Format("https://api.twitter.com/1.1/statuses/home_timeline.json?screen_name={0}&count=10", App.Tscreenname);
     tweetclient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(tweetclient_DownloadStringCompleted);
     tweetclient.DownloadStringAsync(new System.Uri(purl, UriKind.Absolute));
}

private void tweetclient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
     var response = e.Result;
     var jsonData = JsonConvert.DeserializeObject<RootObject>(response);
}
public void LoadData()
{
WebClient tweetclient=新的WebClient();
string purl=string.Format(“https://api.twitter.com/1.1/statuses/home_timeline.json?screen_name={0}&count=10“,App.Tscreenname);
tweetclient.DownloadStringCompleted+=新的DownloadStringCompletedEventHandler(tweetclient\u DownloadStringCompleted);
DownloadStringAsync(newsystem.Uri(purl,UriKind.Absolute));
}
私有void tweetclient_DownloadStringCompleted已完成(对象发送方,DownloadStringCompletedEventArgs e)
{
var响应=e.结果;
var jsonData=JsonConvert.DeserializeObject(响应);
}
我的e.结果出错了

错误:在中发生“System.Net.WebException”类型的异常 System.ni.dll,但未在用户代码中处理


如何解决此问题?

Twitter API 1.1不允许您进行未经验证的web服务调用。您需要使用OAuth或仅应用程序身份验证进行身份验证。
详情: