espresto/reclaim-social-media

Add url unshortenening

Closed this issue · 3 comments

Often tweets and other social posts contain url-shortened (e.g. bit.ly, tinyurl) links. I think it'd be wise to unshorten them (follow the link and see if it results in a HTTP 30x) and replace it in-post.

+1

yeah, good idea. what the twitter mod already does: getting rid of those t.co-links. it’s not ok according to twitter guidelines. but since these are one's own tweets that we are retrieving, i think it's more than fine.

so we start with

<a href="http://t.co/jVNVMy1vPd">bit.ly/1htgwk3</a>

twitter.class.php already takes care of t.com:

<a href="http://bit.ly/1htgwk3">bit.ly/1htgwk3</a>

what we want would be:

<a href="https://github.com/espresto/reclaim-social-media/issues/19">github.com/espresto/reclaim-soci…</a>

this looks nice, but has no composer support: https://github.com/mattwright/URLResolver.php