Get the correct url format to Facebook Sharer
I need to format a url passed to Facebook Sharer via AS3 using navigateToURL(new URLRequest(request), "_blank");
.
The url that is passed has a lot of strange characters. What is the best way to get the correct output?
This works: http://www.facebook.com/sharer.php?u=www.somesiteurlthatdoesnotexist.com?title=This works fine
This does not work: http://www.facebook.com/sharer.php?u=www.somesiteurlthatdoesnotexist.com?title=Jag behöver fixa en url som funkar med åäl och & tecken
Try this:
escape("Jag behöver fixa en url som funkar med åäl och & tecken");
It should make it "URL encoded".
精彩评论