0
我如何至少从公共时间线获得3200条最新推文?这是我目前所做的,但它只会返回我最新的200条推文。获取所有最新推文c#控制台应用程序
无效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
也许Twitter将它限制为最高200? –