I'm a designer, not a coder - and was struggling trying to figure out how to ensure that
when posting pages from my new Drupal 7 site to Facebook, a preview thumbnail would be generated.
I modified this helpful post from Ben Snyder with some code found elsewhere and managed to pull it off...
Hopefully this might be of use to someone else!
Working with my (Zen) subtheme's template.php file (don't hack core) after the very last line of (comment) text I added the following code:
*** note closing php tag that leads, and the fact that there is no closing php at the end of the new addition ***
?>
<?php
/**
* Temporary substitute for Meta Tags module.
*
* @param $path
* The path of the page, passed from html.tpl.php
*/
function manualMetaTags($path) {
// determine the path of the page
switch ($path) {
default:
// if all else fails...
$description = "Add Your Description Here";
$keywords = "There be Keywords here";
}
// output
print "\n";
print "\n";
// include custom Facebook post preview images