开发者

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");.

开发者_C百科

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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜