Open Graph Metatags for Facebook

You can download my WordPress Plugin: Open Graph Metatags for Facebook clicking here.

What are Open Graph Metatags?

Open Graph is a protocol for customizing which information will be scrapped from your site, on Facebook sharing.

What does the plugin?

The plugin just adds the Open Graph metatags on your header, based on the title, content and thumbnail of your post.

How do I install de plugin?

Just download it from the WordPress plugins repository, activate it and enjoy!

Plugin info

Current version: 1.26
Author: Jordi Plana
Release log:

1.26

  • Strip shortcodes function added in order to sanitize description.

1.25

  • Added extra process to get first image attachment as sharing thumbnail, in case of post-thumbnail ausence.

1.21

  • Fixed a bug about thumbnail sharing.

1.1

  • Added extra sanitization of description
  • Added more Open Graph tags: type, url, locale and sitename.

TODO:

  • Develop an user interface to manually introduce which content will be shown.
  • Integration with WordPress SEO by Yoast plugin.
  • Integration with WPML.
Summary
Author Rating
Aggregate Rating
no rating based on 0 votes
Brand Name
JordiPlana.com
Product Name
Open Graph Metatags for Facebook
Price
USD 0
Product Availability
Available in Stock
Jordi Plana

Jordi Plana

I'm Jordi Plana, a software developer in his late twenties.I've been involved in web development for the past 12 years. It all started with a website dedicated to playing board games when I was a teenager, and since then I had the chance to make websites for all kind of businesses, organizations and individuals.

21 thoughts on “Open Graph Metatags for Facebook

  1. Hello, I have been struggling with some posts on my clients site pulling a generic image and description on the fb share….only some posts.. if you go here: http://jlcauvin.com/?page_id=2 and share the first post “How To Get Along With A Struggling Comedian” you will see the generic image and Official Website in the share… the same is true for teh second and third posts… but if you share the 4th one “The Righteous Prick 2012 Oscar Breakdown” you will see a choice of thumbnails and “The Righteous Prick 2012 Oscar Breakdown” as the description.

    I have installed and activated your plug-in and see no change.. can you please advise or direct me to some solution please?

    Thank you,
    Steve Axworthy

    1. Hello Steve,
      Thanks for using the plugin!

      I’ve visited your site and I found the correct Open Graph Metatags showing up for all the four posts. For example in the case of “The Righteous Prick 2012 Oscar Breakdown” the Open Graph Metatag for og:description shows this text: “The 2012 Oscar Nominations were announced for what I believe was the worst year in movies since 2005 (Crash beat Brokeback Mountain while Munich, my favorite movie …”. I’ve checked to share in Facebook and this text came up.

      The Open Graph og:image should point to the post thumbnail. I have been also checking the plugin code and I repaired some bugs about the thumbnail sharing. You should update the plugin to the last version, and check it again. This should fix the image problem.

      Best regards.

    1. Hello Mubarak,
      Thanks for using the plugin!

      Which version of the plugin are you using? You should use the last version.

      The plugin checks for the post thumbnail as og:image. Your theme has to support ‘post-thumbnail’ feature, and your post must have an image set as thumbnail.

      Check out this tips and tell me if you solved the problem.

      Best regards.

  2. Hi Jordi,

    I am using your plug in, thanks for making it. I am not sure if your plug would fix this problem, but when a post is liked on my site, the wrong thumbnail appears. Even if I post the link, I am unable to select a thumbnail for the video in the post, only the site’s logo. Like I said, don’t know if your plugin is supposed to fix this.

    Thanks for your help

    Andrew.

    1. Hello Andrew,

      Thanks for using my plugin.

      The plugin checks for the featured thumbnail of the post, and makes it the ‘sharing thumbnail’. If the thumbnail is not defined, it just does not print the og:image Open Graph tag (this means Facebooks uses the first image it finds when rendering the site).

      In your case you should define one image as featured thumbnail of your video post and that’s it!

      Regards

  3. Hi,

    I also have the same problem like the others. I already installed the plugin and activated it but still the problem exist. Can you check it too? Sharing the link on facebook and it doesnt show the right post title and the right post description. Thanks in advance.

    1. Hello Dio,
      Thanks for using my plugin.

      The plugin checks for the post featured image as the sharing thumbnail. If there isn’t any thumbnail defined it doesn’t show the og:image metatag, and in consequence Facebook will scrap any other image.

      Please try defining the post thumbnail and tell me if this solves your problem.

      Best regards

  4. I do have the featured thumb but when I will share the url of the blogs post to fb.. It will only show the thumbnail, but with the homepage title and homepage meta description.

    1. Hello Gio,

      I checked your site and the og:image tag is not appearing.

      Please update the plugin to the last version (1.25). In this version I made a patch to take the first image attached to the post in case the plugin doesn’t find the post thumbnail.

      Try updating and tell me the results.

      Regards

  5. Hola Jordi, lo primero muchas gracias por el Plugin, me está ayudando mucho con esto!

    He instalado la versión 1.26 y activado el plugin. Cuando comparto un enlace sigue sin mostrarme la meta información, ni la imagen ni ninguna descripción. Si compruebo el código veo que realmente el plugin está funcionando ya que todos los campos meta tag que incluye tienen su correspondiente content. Por ejemplo la imagen en miniatura si lo ves la está recogiendo bien, pero debo hacer algo mal porque no se muestra… No debe ser competencia tuya pues como te digo, el plugin hace su función, pero ¿Podrías orientarme? Muchas gracias, un saludo!

    1. Hola Paco,
      Gracias por usar el plugin. Te aconsejo que instales la última versión del plugin WordPress SEO de Yoast. Además de ser un plugin genial para la indexación en buscadores, trae una funcionalidad muy parecida a la de mi plugin de manera automática.

      Prueba y me comentas.
      Un saludo

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>