Google Short Url Api returns encoded url

458 views Asked by At

I'm trying to get a short url for http://www.facebook.com/sharer/sharer.php?s=100&p[url]= (for facebook sharing) using Google shorten url API. The problem appears when it's return the short URL like http://goo.gl/xxxxx but the long url behind is https://www.facebook.com/sharer/sharer.php?s=100&amp%3Bp%5Burl%5D= and this doesn't work in facebook. Any idea to resolve that?

1

There are 1 answers

1
DevZer0 On

you can use htmlspecialchars_decode or urldecode to decode the url.