The Facebook Like Button is a very useful and rapidly popular social web marketing tool that can be applied to websites and webpages. By default, the Facebook's Like Button form will recommend a specific web page that is hard coded into the code snippet (which can be generated by Facebook's Like Button form).
Typepad users now have the Facebook Like Button embedded as a core application, which has helped to generate a lot of traffic to blog websites based on a recent report by Typepad.
It is possible to publish a Facebook Like Button that references a dynamic WordPress Post page rather than just making recommendations to the website in general.
How to reference the URL for a single WordPress post
On the WordPress post page template, below the snippet: <div <?php post_class() ?> id="post-<?php the_ID(); ?>">, you can print the page URL with the following code:
<?php the_permalink(); ?>
The above code snippet, will print the URL of that post page. However, within the Facebook Button invocation, you will need to take a different approach. Below is an example of the Facebook iFrame code for publishing a button without Profile faces to the WordPress dynamic URL post page. We indicated in bold the <?php ?> tag for printing the WordPress dynamic page.
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80″ scrolling="no" frameborder="0″ style="margin-left: 30px; border:none; overflow:hidden; width:450px; height:30px;" allowTransparency="true"></iframe>
OR for printing HTML code version. Sorry, we will correct the output of quotes soon.
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="margin-left: 30px; border:none; overflow:hidden; width:450px; height:30px;" allowTransparency="true"></iframe>