I have a need to programatically generate status tweets along with a graphical picture in embedded linux using command line. I want to invoke the client using system() (C library) call and pass the tweet text and image filename in the common line string.
Recently, I created a Java SE version of my Android app EmailTweetor, which can be launched from command-line.
To tweet a message
java -jar EmailTweetor.jar tweet hello.txt
echo "Hello" | java -jar EmailTweetor.jar tweet
To tweet with an image:
java -jar EmailTweetor.jar tweet hello.txt image.jpg
The computer where the command is launched will need to have OpenJDK or Oracle Java v1.8 or later. The JAR also needs a one-time authorization with Twitter.