Integrate with Shorten URLs module
| Project: | |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Jump to:
I've just released the Shorten URLs module, which makes it very easy to create short URLs from any of at least 14 services. Shorten URLs takes care of any problems that could arise if getting a short URL is taking too long or if the service is unavailable.
I think Twitter would benefit from integrating with Shorten URLs instead of handling its own URL shortening at TinyURL. This would give users more flexibility in how to handle URL shortening, take some of the burden off the shoulders of Twitter's maintainers, and provide even shorter URLs in many cases than TinyURL can.
To produce a short URL, you just need to call shorten_shorten($url_to_be_shortened) and Shorten URLs will take care of the rest. This would replace calls to twitter_shorten_url($url) in the current API.
Thoughts?

#1
While I like this idea, personally I would not want to see a basic module like Twitter start adding dependencies. Maybe someone can code the integration of your module with Twitter and make it so your module extends the Twitter module without making it a dependency (i.e module_exists() hook)
#2
Yeah, it wouldn't be a dependency. There are three lines in twitter.module at the moment which allow a single, site-specific module to add a custom way to shorten URLs. Presumably, those would be replaced with this:
<?phpif (module_exists('shorten')) {
return shorten_shorten($url);
}
?>
#3
FYI, shorten_shorten() is now shorten_url() in the 1.1 release and later.
#4
According to the 6.x-2.6 release node, this has been fixed! Thanks.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Re-opening as this somehow didn't make it into the 3.x branch.