livebox:twitter

This is an old revision of the document!


xAP Twitter

This component allows you to tweet messages and control any xAP compliant device. The Livebox being such a device.

Due to the way in which Twitter works, you are not able to enter the same tweet twice. To work around this, the xap-twitter daemon will DELETE the tweet once it has processed it.

This means that you lose the audit trail of the commands you have sent. However, it has the benefit of giving active feedback that the command was accepted and processed. Only message beginning with the COMMAND PREFIX will be process by the daemon, and hence eligible for deletion.

Authentication is done via OAUTH so your password is not stored on the livebox.

This will result in the following xAP message being transmitted.

xap-header
{
v=12
hop=1
uid=FF00D900
class=alias
source=dbzoo.livebox.Twitter
}
command
{
text=relay 1 on
}

The commands you enter resolve the same way as the Google Calendar component (See calendar_aliases) and require an alias_interpreter to resolve these into appropriate actions.

The xap-twitter process can also be used to send TWEETs to twitter. This is really useful if you have other scripts or processing running and you wish to record events. Twitter can be that event recording system to notify when something happens. As tweets can be relayed to your phone, this gives you the ability to remotely monitor events.

Sample payload to create the tweet “Hello World”

xAP-header
{
v=12
hop=1
uid=FF00DB00
class=xAPBSC.cmd
source=dbzoo.acme.test
target=dbzoo.livebox.twitter
}
output.state.1
{
id=*
text=Hello World
}
  • livebox/twitter.1327696197.txt.gz
  • Last modified: 2012/01/27 20:29
  • by kevint