I am the administrator of a Joomla 1.5 site. I encountered a problem today, because when I was sharing an article on Facebook, it was being displayed without image. Searching the internet, I found that Facebook needs a link tag to be in the header of the html page, like this:
<link rel="image_src" href="..." />
while my site provides something like this
<meta name="image" content="...." />
My website is using the K2 plugin for articles I have very limited knowledge of Joomla as I have never worked with it, but tried to search the structure of the files and found that in the item.php file the image was referenced like this:
$this->item->image
So I modified the index.php file of the main template to add the following tag in the header:
<link rel="image_src" href="<?php echo JURI::base() . $this->item->image; ?>" />
However, although the $this->item->image; does not give any error it returns nothing. Am I doing something wrong?
Thank you in advance