New Open Graph Tags for Publisher & Author

A quick one for the morning – as announced on the Facebook Developer Blog today, Facebook has updated & extended support for the author- & publisher Open Graph-tags. These tags allow blogs or news-websites to link an article to the Facebook profiles of both the author (=personal profile) and the publisher (=page). Usage is pretty […]

A quick one for the morning – as announced on the Facebook Developer Blog today, Facebook has updated & extended support for the author- & publisher Open Graph-tags. These tags allow blogs or news-websites to link an article to the Facebook profiles of both the author (=personal profile) and the publisher (=page). Usage is pretty simple:

<meta property="article:publisher"
      content="https://www.facebook.com/diesocialisten" />
<meta property="article:author"
      content="https://www.facebook.com/michael.kamleitner" />

While these tags have been recognized before, the real news is that Facebook is starting to use this metadata to display “Like” & “Follow”-buttons on Newsfeed stories about shared articles. This is how its going to look like (we’ve implemented the tags on our own blog, but have yet to see the buttons on the Facebook frontend – we assume that the feature is slowly rolled out):

If you’re running your website with WordPress, here’s a handy code-snippet which inserts the new meta-tags in the <head> – just append it to your functions.php and you’re good to go (of course it would make sense to set article.author dynamically, f.e. by using get_the_author_meta() – but that depends on your individual WordPress setup).

if ( ! function_exists('additional_opengraph_tags') ) {
  function additional_opengraph_tags() {

    if ( is_single() and ! is_page()) {
    ?>
    <meta property="article:publisher" content="https://www.facebook.com/YourPageName" />
    <meta property="article:author" content="https://www.facebook.com/YourAuthorName" />
    <?php
    }
  }
  add_action('wp_head', 'additional_opengraph_tags');
}

About Author

Michael Kamleitner

Michael Kamleitner is CEO & Product Manager at Swat.io, a Social Media Management solution that’s helping companies to improve their customer support & content management on Facebook, Twitter, Instagram and others. Swat.io is currently used by companies such as 3Österreich, Hitradio Ö3, ÖBB, Focus Online and Burda Intermedia. Follow Michael on Twitter, Facebook or Google+!

Facebook Twitter Google+ Foursquare SlideShare