So you want to put a like button on your site? No problem. Just go the this Facebook developers page and you will see this code creator:
Type in the website address that you want people to like. Click “get code” and voila! Take the code, copy and paste it into the html code in the web page where you want to have the like button and you are set. The like button will be on your website and when people click the like button the website you indicated on the form will be liked.
What if you have a site consisting of php scripts which creates thousands of dynamic webpages? Are you going to make a separate like code for each of the thousands of webpages? I do not think so. This was my problem with my site Articledude.com. Currently there are 327,214 articles each on a separate dynamic page created by the php script. Obviously this would be impossible.
You need the code to place on your desired php page that will create the correct like button for the that specific dynamic php page. Here is the code: