TinyURL

32 views
Skip to first unread message

Rick Measham

unread,
Mar 21, 2007, 6:01:48 PM3/21/07
to twitter-deve...@googlegroups.com
Any chance we can NOT use tinyURL? It would save twitter the lookups and
relying on a third party's services, but it would make it easier to use
the URL in a sentence.

I have entries like: Stuck in http://tinyurl.com/34acxr
Which should be: Stuck in http://ikeahacker.blogspot.com/

The first (current) option doesn't tell you anything about what I'm
stuck in. The second does.

I'd think it should be up to the end users to shorten if they want to,
or even the API developers could do it if it suited their application.

Cheers!
Rick Measham

cubic....@gmail.com

unread,
Mar 21, 2007, 6:58:19 PM3/21/07
to Twitter Development Talk
I already "manually" (i.e. via my own app) generate tinyurls, as I
find the Twitter implementation a bit flakey when it comes to URLs
with queries. This hopefully saves the Twitter server a bit of work -
I hope that Twitter doesn't try to generate tinyurls for tinyurls in
posts!

On Mar 21, 10:01 pm, Rick Measham <r...@isite.net.au> wrote:
> Any chance we can NOT use tinyURL? It would save twitter the lookups and
> relying on a third party's services, but it would make it easier to use
> the URL in a sentence.
>

> I have entries like: Stuck inhttp://tinyurl.com/34acxr
> Which should be: Stuck inhttp://ikeahacker.blogspot.com/

Chris Messina

unread,
Mar 21, 2007, 7:06:30 PM3/21/07
to twitter-deve...@googlegroups.com, Larry Halff
I wonder if it wouldn't make sense for Twitter to have their own
internal shortening implementation so that API users can get
additional meta data (title, full url, tags, etc) -- and Twitter can
harvest all the links being sent around.

ElfURL is an open source Rails shortener:

http://dev.biggu.com/repos/elfurl/

As well, Ma.gnolia uses a shortener in its service.

Finally, twttr.com is 2 characters shorter than tinyurl.com. ;)

Chris


--
Chris Messina
Citizen Provocateur &
Open Source Ambassador-at-Large
Work: http://citizenagency.com
Blog: http://factoryjoe.com/blog
Cell: 412 225-1051
Skype: factoryjoe
This email is: [ ] bloggable [X] ask first [ ] private

Ratajik

unread,
Mar 21, 2007, 7:06:53 PM3/21/07
to Twitter Development Talk
I'd actually like to be able to embed (limited) HTML into a post - at
least a <a href=""/>. That way, the total length of the text of the
message isn't sucked up in a URL. I release there are some potential
issues with this (malicious HTML, spamming, et al) but I’d think
there’d be some kind of balance we could get to here. I've noticed a
lot of what people post are URL's to something else, would be very
nice to be able to have the description visible with the link
embedded.

I’d also LOVE to be able to get <img/> tags in, but that be a bit
much… 
-Greg

Chris Messina

unread,
Mar 21, 2007, 7:19:19 PM3/21/07
to twitter-deve...@googlegroups.com
I think it's gotta stay basic given the foundation in SMS.

However, Textile formatting would be a nice addition since it's
concise and the inline formatting follows standard convention (* for
bold, / for italics)... Thus you could link to things like this:

Stuck in my "car":http://ford.com

Chris

Britt Selvitelle

unread,
Mar 21, 2007, 7:28:06 PM3/21/07
to twitter-deve...@googlegroups.com
Yes, I've thought about this a bit. I think eventually we're going to write our own internal system with some crazy cool features :)

Britt
Obvious
http://twitter.com/bs

On 3/21/07, Ratajik <rat...@gmail.com> wrote:

Alex Payne

unread,
Mar 22, 2007, 1:04:32 PM3/22/07
to twitter-deve...@googlegroups.com
I'll second Britt on that. Our own implementation is the end goal.

Right now, we shorten URLs via TinyURL if:

1. the length of the URL is greater than 40 characters
AND
2. The URL includes non-alphanumeric characters (ie, it looks
complicated).

We also maintain an audit log of shortened URLs, and we timeout if
TinyURL doesn't answer in six seconds.

The auto-linking code in Rails is our main source of problems with
URL shortening. That code relies on a complicated regular expression
that doesn't catch many valid URLs. A number of patches have been
submitted to improve auto-linking, but Rails core hasn't moved on
them. We may end up tweaking the regex ourselves so things like
Flickr links aren't broken.

Thanks for your suggestions!

--
Alex Payne
Obvious
http://twitter.com/al3x

Clint Ecker

unread,
Mar 24, 2007, 5:07:35 PM3/24/07
to twitter-deve...@googlegroups.com
Whoa, I didn't know that Twitter automatically shortened URLs. I've
been doing them with my own Python function I wrote for the Ars
Technica account:

import urllib

def get_tinyurl(long_url):
url = "http://tinyurl.com/api-create.php"
params=urllib.urlencode({'url':long_url,})
f = urllib.urlopen(url,params)
short_url = f.read()
return short_url


--
Clint Ecker / Sr. Web Dev / STONE WARD
Little Rock / [ Chicago ]
312.464.1443, ext. 111
http://www.stoneward.com/

Ed Finkler

unread,
Mar 24, 2007, 5:15:18 PM3/24/07
to twitter-deve...@googlegroups.com
On 3/24/07, Clint Ecker <clint...@gmail.com> wrote:
> Whoa, I didn't know that Twitter automatically shortened URLs. I've
> been doing them with my own Python function I wrote for the Ars
> Technica account:

Oh, Clint.... *shakes head*

BTW, thanks to Ars for the usage and coverage of Twitter.

--
- Ed Finkler
http://funkatron.com/

Reply all
Reply to author
Forward
0 new messages