Hi all, im pretty new to using linq2twitter and i have had a bit of a learning curve. There is some great guides and discussions that are extremely helpful and Joes blog to working with timelines has been really helpful to a newbie. I am having an issue
and it will probably be a newbie error but cant get to the bottom of it. I am creating an app that queries ever 5 mins and reads through and counts hashtags, and serves this to a tcp client, all this is working but i need it only pick up the latest tweets
in the last 5 mins, so im querying with sinceID but i then want to get the max ID and set this to the since ID so that it only reads from the last max..... so code look like this ....
ulong maxid, sinceid;
var statusTweets = from tweet in twitterContext.Status
where tweet.Type == StatusType.Mentions &&
tweet.ScreenName == twitterAccountToDisplay &&
tweet.IncludeContributorDetails == true &&
tweet.Count == 10 &&
tweet.SinceID == sinceid &&
tweet.IncludeEntities == true &&
tweet.IncludeUserEntities == true
maxid = statusTweets.Max(search => search.MaxID) -1;
sinceid = maxid;
Im getting an error on maxid = statusTweets.Max(search => search.MaxID) -1; of "Expression of type 'System.UInt64' cannot be used for return type 'System.Object'"
Can anyone give me a pointer on this?