Twitter API is gone and this project uses browser automation (selenium) to post tweets.
This is a console application, no GUI.
You need to enter your twitter username and password once, they will be saved in plain text file.
Google Chrome must be installed on the running machine
(Linux -> Download and install google-chrome-stable_current_amd64.deb)
(Windows -> install Google Chrome)
Do not worry chrome will run headless.
Sample code reads BBC News feed then posts the news title with the link.
Last published article's date is saved to prevent double posts.
You can use crontab to run this example every n minutes.
Default css & xpath selectors use Turkish keywords, these selector expressions could be read from properties file for other languages This issue is solved in dockerized version as environmental variables
Added API feature
Run ApiToXweb class for API version
Run BBC_RSS class for RSS version
Send tweets by posting to http://host:4570/tweet
2FA must be disabled for the twitter account
{
"user":"twitter-username",
"pass":"twitter-password",
"text":"tweet-content"
}
Dockerized version -> https://hub.docker.com/r/yahuuu/apitoxweb