我怎样才能从公共时间线上至少获得 3200 条最新推文?这是我目前所做的,但它只返回我最新的 200 条推文。
无效GetUserTimeLine(TwitterContext ctx){
var statusTweets =
from tweet in twitterCtx.Status
where tweet.Type == StatusType.User &&
tweet.Count == 3200 &&
tweet.ScreenName == "abc"
select tweet;
//PrintTweetsResults(statusTweets);
foreach (var tweet in statusTweets)
{
Console.WriteLine(
"(" + tweet.StatusID + ")" +
"[" + tweet.User.ID + "]" +
tweet.User.Name + ", " +
tweet.Text + ", " +
tweet.CreatedAt);
}
// DEFINE FILE PATH NAME
string dwnloadFilePath = @"C:\temp\Tweet.log";
// CREATE AN EMPTY TEXT FILE
FileStream fs1 = null;
if (!File.Exists(dwnloadFilePath))
{
using (fs1 = File.Create(dwnloadFilePath)) ;
}
// WRITE DATA INTO TEXT FILE
if (File.Exists(dwnloadFilePath))
{
using (StreamWriter sw = new StreamWriter(dwnloadFilePath))
{
statusTweets.ToList().ForEach(
tweet => sw.Write(
"{3}, Tweet ID: {2}, Tweet: {1}\n",
tweet.User.Name, tweet.Text, tweet.StatusID, tweet.CreatedAt));
}
}
Console.ReadLine();
}
有人可以启发我吗?
谢谢,10e5x