I'm looking to unwrap t.co (for Twitter's shortened URL) links using R.
Here's an example of one: http://t.co/Xvb6T3KyHr
Here's the unwrapped URL: http://www.donorschoose.org/project/we-need-technology-in-physical-education/1684466/?utm_source=dc&utm_medium=project&utm_campaign=twitter&rf=twitter-siteshare-2015-09-project-teacher_3103521
There are answers for Python and JS, but as far as I can tell none for R.
You could try
twitteR::decode_short_url("http://t.co/Xvb6T3KyHr")
or
httr::HEAD("http://t.co/Xvb6T3KyHr")$url
There's also a package called longurl from @hrbrmstr. However, it seems as if it doesn't work with t.co links anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With