title: Adding a Like button to a dynamically generated web page
body: <p>We have an application that creates web pages dynamically.  The user enters a title, some descriptions, some images, etc. and clicks the CREATE button, and Presto! the page is created within our domain and is accessible from any browser by entering </p>
  
  <pre><code>                         www.ourdomain.com/thenewpagename
  </code></pre>
  
  <p>This all works fine but now we'd like to add a Like button to the page we create.</p>
  
  <p>I know  that the normal way to add Like buttons to a page is to go the Facebook developer's page, enter some information about the page-to-like, like it's URL, and then copy and paste the code that Facebook generates onto the page. But clearly we can't do that for every page that gets generated by our engine.  So my thought was to add the Like code from another page and then dynamically change the URL in the code the the URL for the page being generated.  But this doesn't work.  It puts a Like button on the page, ok,  and when you try to Like the page the "Add Comment" field comes up momentarily, but then the Add Comment field disappears and the like count goes back to 0.  It acts like Facebook shuts down the button as soon as they saw something fishy. </p>
  
  <p>I'm wondering if anyone sees a way to do what I'm trying to do. Is there maybe a way to generate a new button on the fly for each page we generate by communicating with Facebook with something like cURL?</p>
  
  <p>Thanks for any ideas.</p>