There is javascript associated with the textarea change event. Javascript detects if the contents of the text area is a URL, if so, javascript calls a web service that visits the URL looking for the page title, page description, etc. (Or meta tags of an open protocol protocol) if it is, find each of the tags that they return in javascript that it properly organizes.
Facebook also caches this content, and if the same URL is sent by another user, it uses cache values, not a page revision.
Meta tags of an open protocol protocol:
http://developers.facebook.com/docs/opengraphprotocol/
lolol source share