Example #1
0
func main() {
	stream := make(chan *twitterstream.Tweet)
	client := twitterstream.NewClient("username", "password")
	err := client.Track([]string{"miley"}, stream)
	if err != nil {
		println(err.Error())
	}
	for {
		tw := <-stream
		println(tw.User.Screen_name, ": ", tw.Text)
	}
}
Example #2
0
func main() {
	stream := make(chan *ts.Tweet)
	client := ts.NewClient("user", "pass")
	err := client.Track([]string{"twitter"}, stream)
	if err != nil {
		println(err.String())
	}
	for {
		tw := <-stream
		println(tw.User.Screen_name, ": ", tw.Text)
	}
}