Facebook 'Like' Button URL errors

| No Comments | No TrackBacks
In the wonderful world of the web, a problem was encountered today with an implementation of the FaceBook 'LIKE' button and certain URLs. (The fun never ends.) 

I am currently working with a website that contains many dynamic links that are created based on names. Normally, the names contain straight-forward text. However, there are some names that contain other characters, notably the forward slash. The 'LIKE' button works perfectly until it encounters the forward slash in the URL. (A quick test of the ampersand revealed a success on the 'LIKE' button, so it only seems to be the forward slash that creates the error.)

Encoding the URL with the value of the forward slash was the obvious fix for this issue, but FaceBook encodes the values back to the forward slash. The result throws a 'Page Not Found' error when clicking on the posted URL in the FaceBook profile (the result of clicking on the  'LIKE' button.)

At least I am not the only one having this problem; the problem has been flagged by other developers as a bug. Until then and if possible, the work-around would be to remove any forward slashes from the URLs if you intend to use the FaceBook 'LIKE' button.

Happy developing!

No TrackBacks

TrackBack URL: http://jenikya.com/cgi-bin/mt5/mt-tb.cgi/184

Leave a comment

Archives

OpenID accepted here Learn more about OpenID