- Table of contents
- Twitter Support
DomotiGa can sent Tweets to your Twitter account.
Because of the fact that Twitter uses oauth authentication nowadays, you need to compile and install liboauth and bti cli twitter command... Follow these steps....
You need bti version 033 or higher...
Most Ubuntu distro's are on 032, which doesn't support twitter API 1.1
Ubuntu 14.04 has version 034 in it's repository, so compiling bti is not needed on that distro, finally!
Install distro version:
$ sudo apt-get install bti $ bti -v bti - version 034
If it reports version =< 032 remove it, and compile latest from source code like this:
$ sudo apt-get install liboauth-dev libjson0-dev $ cd ~/install $ git clone https://github.com/gregkh/bti.git $ ./autogen.sh $ (On a Wheezy based Raspberry Pi you now need to: sudo apt-get install xsltproc docbook-xsl) $ make $ sudo make install $ sudo ldconfig
After installation configure bti to make it authenticate by twitter.
$ vi ~/.bti # comments are allowed in the bti config file # rename this to ~/.bti so that you do not need # to constantly enter your account name and/or # password on the command line every time you send # a message. account="your account" password="your password" host=twitter # Example of a custom laconica installation #host=http://army.twit.tv/api/statuses logfile=.bti.log action=update #user="your proxy user" #proxy="http://your proxy address:port" #shrink-urls=yes
Consumer Key and Secret¶You need to register a new application to have access at your twitter following this link: https://twitter.com/apps/new
The application type should be configured as follows:
- No client callback
- Must have read, write permissions
- do not use twitter for the authentication
Twitter will give you the two keys you need and you will put these at the and of your .bti config file as:
Access Token Key and Secret¶
After you have created your application, you need to generate the access tokens. This can be done in in your application apps, by clicking on your application and selecting tab Keys and Access Tokens. Click here on the Create access token at the bottom of the page. This will create the Access Token (Key) and Access Token Secret.
You will need to put these at the and of your .bti config file too, as follows:
Testing a tweet¶
Use the following command to send a test tweet:
$ echo "I'm a #DomotiGa user!" | bti
Note, because twitter discards messages with the same text, you can now enable send timestamp in the settings, which will add a timestamp in front of the tweets. So all messages are different and will be displayed...
Added by htilly almost 6 years ago
Due to changes made by Twitter only API 1.1 is supported. Due to this change bti won´t work.
Solution to this problem can be found here:
I tried to compile the fix and it worked! Guess this will be implemented in release 033.
Added by rdnzl almost 6 years ago
Thanks I updated the wiki page.