Sending to Twitter via YQL

You may have heard of YQL, Yahoo's SQL query language for the web ( Yesterday it was updated to allow insert, delete and Update.
The example shows a simple one line way of updating twitter status that make it look easy to do. I want to have a go
using the Arduino to send YQL statements to update a twitter status. However it's not quite as easy as it looks:

1: The example uses HTTPS to securely send the password. As we know the Arduino can not easily handle HTTPS
The example Open DataTable is here:

2: The URL for YQL is full of characters that need to be encoded before they can be sent.

To solve these:

1: You need to change the table definition to not insist on HTTPS. This is no more dangerous than the current arduino implementations of the Twitter interface
An example Open table with the correct definition is here:

Make a copy of this and store it on your server. Use the same name, it actually defines the database and table to YSQL

To send Twitter update the following needs to be sent to YQL

use '';
insert into twitter.status (status,username,password) values ("Sending from Arduino via YSQL", "andycobley","*****")

The first line tells YQL to use the Open Table definition you have stored on your server (this one is mine and might disappear)
The second line does the YQL insert. You'll need to set the password and account name of course

These commands have to be sent as a HTTP PUT command, properly encoded. In the example code the Send method encodes the above into the proper HTTP form.

Full example code here:

See the YQL page for more details.

Andy C
Not part of Yahoo!