Last active
February 5, 2017 17:12
-
-
Save 178inaba/4dafa23d1b923a24a2e834a53896bb9d to your computer and use it in GitHub Desktop.
Search twitter first tweet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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