My task worked flawlessly, thank you. There was a luser error, where
I cloned a context, then updated the task, thereby updating the source
task and sending the wrong message. BUT, that was my fault. Tasker
itself worked great.
But now I want to enhance it for next time. I noticed that my Twitter
client, Peep, used the
is.gd URL shortening service to link to a map.
It took my location, and created a Google Maps link:
http://maps.google.com/maps?q=39.299200773239136,-95.71948885917664
Then it submitted that link to
is.gd to get:
http://is.gd/dEut5
I note from this page (
http://is.gd/api_info.php ) the technique...
****
Submitting a URL to be shortened
Simply have your application access a URL similar to the following,
via an HTTP GET request:
http://is.gd/api.php?longurl=http://www.example.com
The "
http://www.example.com" parameter in the example above may be
replaced by whatever URL you wish to shorten. The http:// protocol
specifier is optional (if you don't specify any protocol, HTTP will be
assumed and added automatically).
Receiving the shortened URL
After submitting the URL you would like shortened as specified above,
an HTTP response (web page) will be returned. The response header will
be "HTTP/1.1 200 OK" if the URL was shortened as expected, or "HTTP/
1.1 500 Internal Server Error" if there was any problem that prevented
this.
Assuming the request was successful, the body of the response will
contain only the new shortened URL, in plain text. If the request was
unsuccessful, the body of the response will contain a specific error
message giving the reason. These always begin with "Error: " followed
by a message describing why the error occured. These should be fairly
self explanatory and include things like the URL being on our
blacklist or being too long (over 2000 characters).
***
I assume that Tasker can achieve this SEND/GET to allow URL
shortening. Or does it do URL shortening?
So, my intent would be to create a message like "I am now in Kansas!"
and to have the task automatically append the shortened URL to get "I
am now in Kansas!
http://is.gd/dEut5"
Where would I look to learn to construct the URL to be shortened
"
http://maps.google.com/maps?q=%LOC" , send that to
is.gd, then
extract the short link to insert into the message?
I am open to any URL shortening. If I use
bit.ly, I can keep track of
how many clicks the shortened URL receives.
Any help is appreciated!
Dave