Facebook like button with dynamic content, AJAX
For a project I had to add Facebook like buttons to a page which uses AJAX a lot. After going through the Facebook documentation it became clear they did not focus on like buttons which are used on pages that are loaded with AJAX. In most cases when you click on a like button, you send a request to the facebook servers. Then the facebook servers reads in the HTML of the page you want to like. It parses the HTML and uses the Open Graph meta tags if it finds those; else it uses some content it finds on that page.
After doing some tests I figured out how to create like buttons on the fly using the XFBML markup language and especially their parse function. The only thing was, that I did not wanted to create a page for each of the possible like items I've got. Therefore I created some code which creates a empty HTML page that contains all the necessary Open Graph tags it needs. Together with a small Javascript class (using Mootools, but easily portable to some other lib), I created a handy tool to create custom like button on the fly with support for custom images, descriptions, etc..
Download the Facebook Like button generator