When one puts a link on Facebook to share, Facebook automatically grabs some sample text from the page to display along with the link. Usually that looks pretty good.

But whenever someone puts a link to a page on my Drupal site on Facebook it ends up getting some useless gibberish from the page heading for the sample text. It looks to me like Facebook grabs the contents of the first <p> section of the page, which for most sites seems to work pretty well. But on my site what ends up being shown is some stuff from my page heading (navigation links) that are defined in my custom-made theme's page.tpl.php file. This stuff does include some <p> html.

Any ideas how I can tweak my site so that the first <p> section of the actual content part of the page is used instead? Thanks very much.

Comments

steve02476’s picture

I tried monkeying around with my page.tpl.php file but it didn't help.

I suspect the answer may be in adding meta tags according to this:
http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_...

I'll try that for now.

steve02476’s picture

I found that while I had the Nodewords / MetaTags module installed, the "basic metatags" part of the mudule was not enabled. When I turned it on again, and made sure the "Description" field was enabled and had something useful in it, that fixed the problem. Hope this helps someone else who finds themselves with the same problem.