How to Add Facebook Image Meta in Thesis

by Justin on June 29, 2010

It’s nice when we write good content. It’s even better when a reader shares it on sites such as facebook or twitter. One problem with sharing on facebook is that facebook will try to pull in images from the site but may not always pull in the one you want. You can control what images show up with a special meta tag. This will make the one you pick as the first image, but unfortunately not the only image. This is still useful if you post only a youtube video in your post or page and want to specify an image for when shared on facebook. Facebook has a set of share tags available.

To specify an image I first upload it using the Media->Add New wordpress page and grab the URL of the image after I upload it. Next, while on the page or post scroll down to the Custom Fields area. The first time you will need to add a new field. Call it image_src and to the right paste in the full path to the image you just uploaded. Save the post. Next, add the code below one time to your Thesis theme’s custom_functions.php file.

Here is the link to the text file with the Thesis code to add to custom_functions.php.

That’s it! Pretty simple huh? Leave a comment if you have any questions or comments. Thanks for reading!

{ 3 comments… read them below or add one }

Diana Freedman August 27, 2010 at 10:52 am

I followed your directions, but this still does not work on my blog. I’ve tried other solutions as well, such as: http://www.wolf-howl.com/blogs/thesis-digg-facebook/. I can’t for the life of me figure out what I’m doing wrong… :-(

My blog url is http://ustandout.com; please let me know if you have any suggestions. Thanks!

Diana
@dianafreedman
.-= Diana Freedman´s last blog ..How to Choose a Blog Publishing Application =-.

Reply

Justin August 27, 2010 at 3:42 pm

Diana,

Did you add the meta tag in when you added the post? You have to do this for each post that you want to specify the image to use when people share your content.

Reply

Diana Freedman August 27, 2010 at 4:05 pm

Yes I did, I added a new custom field for image_src with the image URL.
.-= Diana Freedman´s last blog ..How to Choose a Blog Publishing Application =-.

Reply

Leave a Comment

Previous post:

Next post: