Configuring Open Graphics (OG) meta tags

MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 14:36

Open /themes/YOUR ACTIVE THEME/views/page.html.php
Find <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
Directly under it add

 <meta property="og:image" content="<?= $theme->item->thumb_url(true)?>"/ >    
  <meta property="og:title" content="<?=  $theme->item()->title ?>" />
  <meta property="og:description"content="<?= $theme->item()->description ?> " />
  <meta property="og:url" content="<?= $theme->item->abs_url() ?>" />

It should now look like this

 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta property="og:image" content="<?= $theme->item->thumb_url(true)?>"/ >    
  <meta property="og:title" content="<?=  $theme->item()->title ?>" />
  <meta property="og:description"content="<?= $theme->item()->description ?> " />
  <meta property="og:url" content="<?= $theme->item->abs_url() ?>" />

Save file.
Check your gallery installation (using either main url or url of either a picture or a video)
https://developers.facebook.com/tools/debug

For those who are code editing deficient attached is copy of my edited page.html.php file
NOTE: I use wind theme these instructions should work with any theme that has a page.html.php file

Backup your original file before editing
AttachmentSize
page.html_.php_.zip2.27 KB
 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 14:44

For those also using imobile use this page.html.php file