尝试获取用户HomeTimeLine
,但我收到以下异常
在Newtonsoft.Json.dll中发生'System.NullReferenceException'
我的代码如下:
**OAuthTokens tokens = new OAuthTokens();
TimelineOptions properties = new TimelineOptions();
tokens.AccessToken = "myaccessToke";
tokens.AccessTokenSecret = "my secret accss token";
tokens.ConsumerKey = "my consumer key";
tokens.ConsumerSecret = "my consomer secret";
properties.UseSSL = true;
properties.IncludeRetweets = true;
//Pas besoin de parser avec Twitterizer
try
{
TwitterResponse<TwitterStatusCollection> timelineResponse = TwitterTimeline.HomeTimeline(tokens, properties);
foreach (var item in timelineResponse.ResponseObject)
{
String textStatus = item.Text;
}
}
catch (Exception e)
{
Debug.WriteLine("Error message :"+e.Message);
}**
当我尝试使用相同的代码来获取朋友时间表时,它的工作正常:
TwitterResponse<TwitterStatusCollection> timelineResponse =
TwitterTimeline.FriendTimeline(tokens);
请各位帮忙,谢谢