This project has moved and is read-only. For the latest updates, please go here.

how to get tweets from a hour before until now

Oct 24, 2013 at 8:49 PM

I am trying to get tweets which are sent between now and a hour before. How can i get them? I tried to do it with sinceId but i dont know the id of a tweet which is sent a hour before.

Oct 25, 2013 at 4:59 PM

I think the only way to do this is to page through the results and look at the CreatedAt property of the tweet (Status). I wrote a blog post, Working with Timelines with LINQ to Twitter, that might help you.
Oct 26, 2013 at 12:00 AM
Hi again,

I solved this one but i have 1 more question.

In my web application, program searches for some tweets and updates the status of the user. While the application is open, if search linq finds some tweets, application also updates status. However, i want my application to do same thing when it is not open. I mean, if i give access to application from my twitter account, it should be able to update my status when the application website is not open. How can i do? Should i publish my website to the host or something like that?

Oct 26, 2013 at 12:08 AM
You can do this by giving LINQ to Twitter all 4 credentials of the user it's operating on behalf of. Credentials don't expire, so you can save and reuse them.

Running without you being there requires something other than a Web app. I typically implement these things as either a scheduled task or windows service. Both solutions require you to have access to the server to set things up. If you chose the scheduled task option, you can use a simple Console app, like the ones you can find in the downloadable source code. If you go the Windows Service route, you can use code similar to the console program, but hosted in the service.

Oct 26, 2013 at 1:15 AM
I was planning to use Windows Service. I need to do some resources. Thanks for advices :)