XTB stands for XMPP-Twitter-Bridge and connects Jabber and Twitter. It’s written in Java.
If you want to install XTB you need to do the following steps:
- Create a directory, or choose an existing one, lets call it
- Download the latest version of XTB from github
- Create another directory
$DIR/liband download the following libraries and extract them to
$DIR/libshould now contain the following files:
You also have to setup an additional Jabber account, let’s call it
$jabberbot . You might want to add this new account to the roaster of your Jabber account.
And of course you need to have a twitter account ;-)
That is it. You are now able to run XTB:
At the first launch you are asked some questions about your accounts.
This information will be stored in
$DIR/conf , so you don’t need to provide it at every restart.
You can change the location of the config file with
If you want to change your credentials just delete this file and restart XTB, you are free to pass
--clearconf as argument and XTB will delete this file for you.
To enable debugging mode call XTB with the
An overview about available arguments is presented with
How it works
Twitter -> Jabber
At each start the Jabber bot will send its Jabber contact the message
"back!" and some recent updates from your Twitter stream. If this is done, XTB checks every 60s for news from Twitter and will send them immediately, so you’ll stay informed ;-)
Twitter updates will be sent in the following format:
TWEETID can be used to retweed this entry.
SOURCE is something like
binfalse-tools . If you don’t like the format, feel free to contact me, maybe I’ll install different formats.
I think it’s a bad behavior, that Twitter shortens URL’s to
t.co/SMTH . You have no chance to know where you’ll end up, so XTB tries to unshort these URL’s and to give you a taste of what to expect. You’ll hopefully see no
t.co links ;-)
Jabber -> Twitter
You are also able to interact with Twitter through XTB. You can send several commands via Jabber to the bot and it will process it. All available commands start with an exclamation mark (
! ) and will be listed if you send
So if you send
!follow binfalse you’ll follow me on twitter. The latest tweets from my time line are shown with
!latest binfalse .
If you want twitter to believe you’re playing golf in in Kuala Lumpur send
!location 3.036383,101.717248 to the bot. To delete the location just send
!location without an argument.
Every message not starting with an exclamation mark is supposed to be an update and will be posted to Twitter and hopefully appear in your stream ;-)
This is an open source project, licensed under GPL. The sources of XTB are available at github. The API is documented with JavaDoc.
Leave a comment
There are multiple options to leave a comment:
- send me an email
- submit a comment through the feedback page (anonymously via TOR)
- Fork this repo at GitHub, add your comment to the _data/comments directory and send me a pull request
- Fill the following form and Staticman will automagically create a pull request for you:
[…] can find the new XMPP to Twitter bridge with the name XTB in my sidebar. It’s now written in nice Java code, easy to understand and much easier to work […]