LinqToTwitter Apiとコンテキストを使用して、すべてのつぶやきを画面名から取得していますが、3200個のつぶやきが残っています。 max_idとsince_idの概念も使用しています。 画面名を使用してプロファイルからすべてのつぶやきを取得するために必要な変更はありますか?以下 は私のコードです: `LinqToTwiiterを使用しているプロフィールのつぶやきをすべて取得する
List<Status> searchResults = new List<Status>();
try
{
var twitterCtx = new TwitterContext(auth);
int maxNumberToFind = 200;
ulong sinceID = 1;
ulong maxID;
var tweets = (from tweet in twitterCtx.Status
where tweet.Type == StatusType.User &&
tweet.ScreenName == screenName &&
tweet.Count == maxNumberToFind &&
tweet.SinceID == sinceID &&
tweet.Retweeted==false
select tweet).ToList();
if (tweets.Count > 0)
{
maxID = searchResults.Min(status => status.StatusID) - 1;
searchResults.AddRange(tweets);
}
do
{
tweets.Clear();
tweets = (from tweet in twitterCtx.Status
where tweet.Type == StatusType.User &&
tweet.ScreenName == screenName &&
tweet.Count == maxNumberToFind &&
tweet.MaxID == maxID &&
tweet.SinceID == sinceID &&
tweet.Retweeted == false
select tweet).ToList();
searchResults.AddRange(tweets);
maxID = tweets.Min(x => x.StatusID);
} while (searchResults.Count <= 5000);//tweets.Any()`
}
catch (Exception ex) { ex.ToString(); }
return searchResults;
}
あなたの質問/問題は何ですか? –
私はすべてのつぶやきが必要です。私は3200のつぶやきの周りに立ち往生ですか? – ankita25