开发者

Get the correct url format to Facebook Sharer

开发者 https://www.devze.com 2023-04-10 20:18 出处:网络
I need to format a url passed to Facebook Sharer via AS3 using navigateToURL(new URLRequest(request), \"_blank\");.

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

精彩评论

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