How to add Facebook Open Graph (og) meta tags to blog detail page in Kentico


We can use Head HTML Code WebPart in your Page Template and using macros to populate your tags content.



+ Configure the WebPart
     - Configure the webpart: fbgraph
     -  Web part title: Facebook Open Graph
     -  HTML code

<meta property="og:title" content="{% BlogPostTitle %}" />
<meta property="og:site_name" content="Kentico 9" />
<meta property="og:url" content="{% CurrentDocument.AbsoluteURL #%}" />
<meta property="og:description" content="{% StripTags(BlogPostSummary) %}" />
<meta property="og:image" content="http://{% domain %}/getattachment/{% BlogPostTeaser %}/.aspx" />
<meta property="og:type" content="article" />

Comments

  1. Kentico 13 xperience developers I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.

    ReplyDelete
  2. It was such a great work. Kentico Upgrade

    ReplyDelete

Post a Comment

Popular posts from this blog

HTML5 video loop src change on end play function

PHP: Date Difference for PHP 5.2

Custom OpenCart 2.3.0.2 theme