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 028 or higher...

On Ubuntu 11.04 you can use the standard pkg, on older versions you need to compile it yourself.

Ubuntu 11.04:

$ sudo apt-get install bti

Older Ubuntu versions:

$ cd ~install
$ sudo apt-get install libnss3-dev git

$ svn co https://oauth.googlecode.com/svn/code/c/liboauth
$ cd liboauth
$ ./configure --enable-nss
$ make
$ sudo make install

$ cd ..
$ git clone git://github.com/gregkh/bti.git
$ cd bti
$ ./autogen.sh
$ 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 is client without callback, must to have write permission and 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:

consumer_key=ambarabaciccicocco
consumer_secret=trecivettesulcomò

Then try your first run:
$ bti

You will be prompted to browse a specific link and past back the pin you see. Then you will be asked to add other two rows in your configuration file the process is completed! You can test with the command:
$ 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...

Resources

Comment

    Updated by: rdnzl, Updated 8 months ago
    Access count: 601 since 2011-08-25

    domotiga-twitter.jpg (78.1 kB) rdnzl, 08/23/2011 02:36 pm