https://github.com/garugaru/twitter-bot
Twitter bot written in java
https://github.com/garugaru/twitter-bot
bot java twitter twitter-api
Last synced: about 2 months ago
JSON representation
Twitter bot written in java
- Host: GitHub
- URL: https://github.com/garugaru/twitter-bot
- Owner: GaruGaru
- Created: 2017-07-02T16:31:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T16:43:06.000Z (about 9 years ago)
- Last Synced: 2025-08-18T15:39:49.372Z (11 months ago)
- Topics: bot, java, twitter, twitter-api
- Language: Java
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Twitter bot framework written in java based on Twitterj4
## Usage
### Create twitterj4.properties file under main/resources folder
oauth.consumerKey=***********************
oauth.consumerSecret=***********************
oauth.accessToken=***********************
oauth.accessTokenSecret=***********************
### Pendulum bot (please just don't do this)
TwitterBot bot = TwitterBot.builder()
.twitter(TwitterApi.fromTwitter(TwitterFactory.getSingleton()))
.task(twitter -> twitter.twit("tick"), 1, TimeUnit.SECONDS)
.task(twitter -> twitter.twit("Donn"), 1, TimeUnit.HOURS)
.build();
bot.run();
### Rss example
TwitterBot bot = TwitterBot.builder()
.twitter(TwitterApi.fromTwitter(TwitterFactory.getSingleton()))
.task(RssTask.create("https://www.reddit.com/r/programming/.rss"), 6, TimeUnit.HOURS)
.build();
bot.run();