// ツイート func tweet(queue Queue, client *oauth.Consumer, accessToken *oauth.AccessToken) error { _, err := client.PostForm( "https://api.twitter.com/1.1/statuses/update.json", map[string]string{"status": queue.Text}, accessToken, ) return err }
// お気に入り func favorite(queue Queue, client *oauth.Consumer, accessToken *oauth.AccessToken) error { _, err := client.PostForm( "https://api.twitter.com/1.1/favorites/create.json", map[string]string{"id": queue.TweetId}, accessToken, ) return err }
// リツイート func retweet(queue Queue, client *oauth.Consumer, accessToken *oauth.AccessToken) error { _, err := client.PostForm( fmt.Sprintf("https://api.twitter.com/1.1/statuses/retweet/%s.json", queue.TweetId), nil, accessToken, ) return err }