开发者

Passing Japanese (non-Latin) URLs in Facebook "like" button URL fails

I think this is a URL encoding problem and not a bug in Facebook, but I'm really not sure.

This URL fails on the Like button: http://www.thefraser.com/2010/11/%E5%8B%95%E7%89%A9%E3%81%A8%E3%81%AE%E6%88%A6%E3%81%84

But this one works: http://www.thefraser.com/2010/11/carlos

What worries me is that the former URL fails in the Like button generator thing on Facebook, giving me an error saying 开发者_Python百科that there is no fanpage at the given URL.

I think the like button generator is glitched in the same way that my URL encoding is. I highly doubt that Facebook's like button itself is broken, since then everyone with non-English URLs would be complaining.

On the other hand, the same URL encoding for the same URL works for Twitter, so... hmm...

Any ideas for a workaround URL encoding? This one I'm using right now is Microsoft.JScript.GlobalObject.encodeURI(), which in theory behaves the same way as the JavaScript encodeURI function.

Strange question, I know, but any help would be appreciated. I'm on the verge of eating my cat alive.

Edit: other Japanese URLs, like this one:

http://ja.wikipedia.org/wiki/%E3%81%8F%E3%82%8B%E3%82%8A

don't fail with the Like button generator. Bahhh!


I look into the source code of the given page, it seems your URL has been escaped twice in the source code:

line 125 (%E5 has been converted into %25E5):

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.thefraser.com/2010/11/%25E5%258B%2595%25E7%2589%25A9%25E3%2581%25A8%25E3%2581%25AE%25E6%2588%25A6%25E3%2581%2584&layout=standard ...

Are you using PHP? Double check the code that generate this line. Post it here if unsure.


Nope, it's a bug.

Hello,

Please file a bug for this issue in bugzilla (or subscribe to an existing bug and add your information to it). Best practice is to link back to the bug in the originating forum thread to help fellow developers and Facebook engineers track the conversation and provide follow-up.

Make sure your bug includes sample code and solid reproduction steps.

Thanks, Matt Trainer

Great. Their Bugzilla is also giving me an HTTP/500.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜