Closed nifflin closed 6 years ago
Probably something like:
func main() {
api := anaconda.NewTwitterApiWithCredentials(
access_token,
access_token_secret,
consumer_key,
consumer_secret,
)
v := url.Values{}
s := api.PublicStreamFilter(v)
v.Add("follow", "15209123") // 15209123 = @dijit
log.Info(v.Encode())
for t := range s.C {
switch v := t.(type) {
case anaconda.Tweet:
logrus.Infof("%-15s: %s\n", v.User.ScreenName, v.Text)
}
}
}
Sorry, but I think the public streams have been shut down by Twitter.
Sorry, but I think the public streams have been shut down by Twitter.
I tested it a few days ago, it works, but NOT stable. The result output stream could be shut down any time.
twtapi.UserStream(url.Values{"with": []string{"realDonaldTrump", "BarackObama", "myownusername"}}) I tested it, this doesn't work. Just get a lot of nil tweet pointer from anaconda.Stream. Thank you.