Skip to content

Instantly share code, notes, and snippets.

@178inaba
Last active February 5, 2017 17:12
Show Gist options
  • Save 178inaba/4dafa23d1b923a24a2e834a53896bb9d to your computer and use it in GitHub Desktop.
Save 178inaba/4dafa23d1b923a24a2e834a53896bb9d to your computer and use it in GitHub Desktop.
Search twitter first tweet.
package main
import (
"fmt"
"log"
"github.com/ChimeraCoder/anaconda"
)
func main() {
anaconda.SetConsumerKey("foo")
anaconda.SetConsumerSecret("bar")
api := anaconda.NewTwitterApi("baz", "foobar")
for i := int64(0); ; i++ {
tweet, err := api.GetTweet(i, nil)
if err != nil {
log.Println(err)
continue
}
fmt.Println(tweet.User.ScreenName)
fmt.Println(tweet.Text)
break
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment