andstatus / andstatus

Multiple accounts client for multiple Social networks. For Android
http://andstatus.org/
Apache License 2.0
311 stars 71 forks source link

Add an option to expand shortened URLs #4

Open yvolk opened 12 years ago

yvolk commented 12 years ago

See the service description: http://longurl.org

The feature will serve two purposes:

  1. Know where the link will really lead you before you click it.
  2. Speed up link access by asynchronously expanding URLs beforehand (should be configurable, when/whether/how to do this...)

April 2019: now we should think about "Link previews". That would be really interesting to add this (as an optional) feature. Information for such previews could be extracted from the target page metadata (header only? or maybe there other other protocols to retrieve page metadata?) I didn't realize that some web pages have markup specifically for such previews (e.g. "Twitter cards" https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started )

dalb8 commented 11 years ago

I use an app I found on Github called urlsetter which listens for URLs. Not sure how it works. Unfortunately the app has been abandoned.

dalb8 commented 11 years ago

https://github.com/emartynov/UrlSetter . There has been activity on it lately. Sorry for double post, I'm using GH mobile site.

marjoleink commented 9 years ago

I have an app installed called Unfurlr - when following a link I can choose this instead of a browser directly, and it will show me where the link goes so you can decide whether to follow the link or not. I'm sure there are other, similar apps. So, I wonder if such already-existing functionality should be duplicated?

yvolk commented 9 years ago

@marjoleink Your tool helps a lot, but for me it would be interesting to see expanded URL directly in a Timeline, without clicking a link. I don't know if the result is worth the effort though...

marjoleink commented 9 years ago

It could be a lot of effort to maintain, as there are numerous shortening services, and not all give up data with a simple http 'HEAD' command (as they should). I'd suggest to leave this to the specialists. At least I don't see this as a core function for a microblogging client. OTH, if you can "talk" to such an external tool and just use the result to replace a link in the message, that might be a good middle ground.

DanielHeath commented 8 years ago

Why not just make an HTTP GET request, then close the connection before reading the body? Save bandwidth and get the actual, final URL

yvolk commented 8 years ago

I think short URLs expanding ("unrolling") would be a killer feature. It will give users more info on links destination before even clicking on them. That URL expansion feature could even lookup a target page title also...

@DanielHeath Thank you for the tip on implementation. You could even provide your solution as a reusable class to be integrated into AndStatus ;-)