I wanted to share this little piece of code because I did not quickly find any great documentation on this.
My needs where as follows: I had a URL lets say http://bit.ly/2pwccfo and I did not have the direct access to the image of the URL. So I ended up creating a small static class that holds a method GetRedirectedUrl that will get my redirect url.
Here is my code:
You can find my gist here.