开发者

Share link on Facebook is strangly encoded

How do you share a link on Facebook? I have no problem with submitting a top level URL (site.com). When I try to share a deeper link (site.com/anything), Facebook incorrectly encodes the lin开发者_运维技巧k. I tried pre-encoding my URL with Javascript's escape(), but Facebook doesn't like that either.

Share link on Facebook is strangly encoded


Deeper links work fine, provided that the link actually resolves to something. I only get the encoded path if the URL does not resolve at all.

Update: I suspect in this instance, resolve = responds with a 200 OK HTTP response. The URL you linked (http://veetle.com/v/4d75ad1a6d412) gives me a 301 redirect to http://veetle.com/view.php/4d75ad1a6d412, which in turn gives me a 302 redirect to http://veetle.com/index.php/channel/view#4d75ad1a6d412.

When I enter the last URL into the Facebook share page, it resolves fine: http://www.facebook.com/share.php?u=http://veetle.com/index.php/channel/view#4d75ad1a6d412

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜