How to get the latest Tweet ID on twitter

Jul 29, 2014 at 1:59 PM
In order to do a search and set the Max Id to the current moment, is there a way to obtain the very latest tweet ID used by anyone on Twitter ?

Thanks
Coordinator
Jul 30, 2014 at 2:35 PM
Edited Jul 30, 2014 at 2:36 PM
As discussed in https://tweetinvi.codeplex.com/discussions/554135

Here are the solutions you could use:
// From any account if you do not already have a sample stream running on your machine + account
var stream = Stream.CreateSampleStream();
stream.TweetReceived += (sender, args) =>
{
    var lastPublishedTweetId = args.Tweet.Id;
    stream.StopStream();
};

// From another test account so that is does not "corrupt" the account profile
var tweet = Tweet.PublishTweet(Guid.NewGuid().ToString());
var lastPublishedTweetId = tweet.Id;
tweet.Destroy();
Linvi
Marked as answer by linvi on 7/30/2014 at 7:38 AM