~alexwennerberg/twitterbots-go

f38d7f1af4d03af8e6b1310f9254ff18b9a3a69c — alex wennerberg 2 months ago f9207b1
Final updates
1 files changed, 9 insertions(+), 4 deletions(-)

M main.go
M main.go => main.go +9 -4
@@ 18,7 18,10 @@ func main() {
	flag.Parse()
	fmt.Println("Loading authentication data from", *fileName)
	config, err := loadConfig(fileName)
	_, err = getTwitterClient(config)
	if err != nil {
		panic(err)
	}
	client, err := getTwitterClient(config)
	var tweet string
	if *mode == "souls" {
		tweet = generateSoulsTweet()


@@ 31,9 34,11 @@ func main() {
	if err != nil {
		panic(err)
	}
	// _, _, err = client.Statuses.Update(tweet, nil)
	// fetch username etc
	fmt.Printf("Posted update \"%s\"\n", tweet)
	postedTweet, _, err := client.Statuses.Update(tweet, nil)
	if err != nil {
		panic(err)
	}
	fmt.Printf("@%s posted update \"%s\"\n", postedTweet.User.ScreenName, tweet)
	if err != nil {
		panic(err)
	}