Retrieve status ID with username and date created parameters

Dec 31, 2013 at 11:32 AM
So I have the name of a user and the exact date the tweet was created in a List. Is it possible for me to use these two properties and retrieve the status ID of the tweet? I'd like to get the number of times the tweet was RTed. This is roughly what my 'incorrect but close' code looks like:
var getTweets = (from tweet in twitterCtx.Status
                         where tweet.Type == StatusType.User &&
                         tweet.ScreenName == NewStatusList[k].UserName && tweet.CreatedAt == NewStatusList[k].CreatedAt && tweet.Count == 1
                                                select tweet).SingleorDefault();
Coordinator
Dec 31, 2013 at 4:46 PM
Hi,

The Parameters list in the Documentation identifies which parameters you can use for queries:

http://linqtotwitter.codeplex.com/wikipage?title=Querying%20the%20User%20Timeline&referringTitle=Making%20Status%20Queries%20and%20Calls

Querying a REST endpoint isn't like querying a SQL database because you only have what the endpoint exposes. In this case, the available parameters are limited to what the Twitter API allows.

Given the constraints, you have to use other creative means to accomplish your goal. In this case, I would stay with the StatusType.User query, but page through results until you get back to the date you need. Here's a blog post I wrote on how to page through a timeline:

http://geekswithblogs.net/WinAZ/archive/2012/09/02/working-with-timelines-with-linq-to-twitter.aspx

@JoeMayo