Tag Archives: fbsl

Facebook: Bug with URL encoding

Today, while I was working on the URL encoding for the recently released Facebook-style Links module, I realized a bug with Link Attachments feature on Facebook. Before I explain, let us reproduce it:

Try to attach the following link on Facebook: http://google.com/search?q=blenders%26pride. This URL actually queries Google for ‘blenders&pride’. Facebook converts/encodes the above URL to http://google.com/search?q=blenders&pride which is not the same as above and queries Google for just ‘blenders’.

So, why Facebook does this? Probably Facebook tries to encode the URL to remove the characters which are not allowed by RFC 3986 and replaces them with their percent encoding. But there are certain characters which should not be encoded, such as ‘/’, ‘?’, ‘#’, ‘@’ which are the reserved characters and used as delimiters in the URL. So, it decodes these characters and converts their encoding to the original character which gives rise to the problem. Let us see an example:
Continue reading

Drupal: Facebook-style Links

Facebook-style Links (FBSL) provides the ability for users to attach and submit links along with their Facebook-style Statuses. Combined with Facebook-style Statuses (FBSS), the FBSL module provides an attach link form that loads via AHAH. Users can then attach a link with an (optional) thumbnail, title and description to their status. In the nutshell, it imitates the link attachment feature on Facebook.

screenshot-londonfuse

Screenshot of FBSL on LondonFuse.ca


Continue reading