Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (21 sloc) 673 Bytes

Go Twitter

This is a simple module to communicate with the Twitter API.

Note: This is library is currently very simple and only supports use of the stream API.


go get


Stream tweets in real time

package main

import (

func main() {
	stream := &twitter.StreamApi{"username", "password"}

	tweets := make(chan *twitter.Tweet)
	go stream.StatusesFilter([]string{"hello"}, tweets)
	for tweet := range tweets {
		fmt.Printf("@%s: \"%s\"\n", tweet.User.ScreenName, tweet.Text)