I’m looking to get tweets published in the past through the API. The thing is that I get no results for something like one year back, the API returns nothing. However, twitter.com/search do return tweets if I put the very same query I tried on my application. I don’t get errrors from the API either.
The test query is: hello since:2014-02-01 until:2014-02-28
Why does this happen? is possible to make the API do what I need?
Thanks!
P.S.: If you wonder, I’m using this little test program written in Go for testing purposes:
package main
import (
"fmt"
"github.com/ChimeraCoder/anaconda"
)
func main() {
anaconda.SetConsumerKey("xxxxxxxxxxx")
anaconda.SetConsumerSecret("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
api := anaconda.NewTwitterApi("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
searchresult, err := api.GetSearch("hello since:2014-02-01 until:2014-02-28", nil)
if err != nil {
fmt.Println(err)
}
for _, tweet := range searchresult.Statuses {
fmt.Println(tweet.Text, tweet.CreatedAt)
}
}