View Demo & Code Walkthrough
·
Report Bug
·
Request Feature
Table of Contents
This Twitter Bot automates the tracking and retweeting process and was built for users who want their feed to keep active with the latest tweets of their defined hashtag or phrase.
Simply choose between an open stream (for unlimited and continuous retweets) or a set number of retweets via defined search parameters.
To get a local copy up and running follow these simple example steps.
- Twitter Developers Account
- Twitter Account
-
Clone the repo
git clone git@github.com:ellojess/Twitter-Bot.git
-
Get your free credentials from Twitter at https://developer.twitter.com/en/dashboard
Use the credentials from the Developers Account to get the following values.
Replace VALUE with your personal credentials and declare them locally in your terminal
$ export CONSUMER_KEY=VALUE $ export CONSUMER_SECRET=VALUE $ export ACCESS_TOKEN=VALUE $ export ACCESS_TOKEN_SECRET=VALUE
-
To run the bot
$ go build && go run ./main.go
Lets say it's the FIFA World Cup and you want your Twitter to be updated with the latest tweets at all times for the event. Without having to take your eyes off the screen, Twitter Bot will manage retweets of the event for you. All you need to do is update the
stream := api.PublicStreamFilter(url.Values{
"track": []string{"#worldcup"},
})
This code snippet defines a stream to track #worldcup
Maybe you haven't retweeted in awhile and you want to quickly post something to keep your Twitter account active. Twitter Bot has the option to retweet a specified number of tweets in a second.
searchParams := &twitter.SearchTweetParams{
Query: "love",
Count: 3,
ResultType: "trending",
Lang: "en",
}
This code snippet defines the search parameters for the bot to find love
in Twitter's platform and returns 3 english posts from trending
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request using this template
Distributed under the MIT License. See LICENSE
for more information.
Jessica Trinh - @ellojesss - jtjessicatrinh@gmail.com
Project Link: https://github.com/ellojess/Twitter-Bot