How to Change the Facebook Metadata for Your Joomla Site

Integrate your Joomla Site with your Facebook Page

Just like search engines, Facebook scrapes metadata information from your Joomla site. This metadata includes the description, title and image, as we explained in a previous post.

You can control the metadata that Facebook scrapes from your page.

In this post, I'm going to show you how to control how your site shares metadata with Facebook. Let's start...

Step #1. Edit the template file

This step may depend on the template you’re using.

Note: If you are using a template that may get updates later, please consider creating a copy of the template so you can work your customizations on your own copy. This tutorial will help you to understand this process.

  1. In the Joomla administrator, go to Extensions
  2. Templates
  3. Templates
  4. Click your template details and files

The Joomla admin area with templates

  • Edit the file index.php
  • Before closing the head tag, add these meta tags replacing "your-full-facebook-page-url" with the full URL of your own Facebook page:

<meta property="article:publisher" content="your-full-facebook-page-url" />
<meta property="article:author" content="your-full-facebook-page-url" />

We're using the Joomlashack Facebook page as anexample. This is how would look in our end:

Editing a template file in the Joomla admin

  • Click save and close when you're done.

Step #2. Test your site’s URL through Facebooks sharing debugger

When you share a URL for the first time, Facebook saves the page details. If you later decide to update the content of your Joomla site and share the URL again, those changes won't be reflected.

You need to tell Facebook to scrape your site to get the new information from the new meta tags.

The Facebook debugger

Scroll down to preview the result to check if the author information was replaced with a link to your Facebook page.

Facebook scraping a Joomla site

In the example above the correct data doesn't show, we need to click theScrape again button. This forces Facebook to crawl the page again and find the new metadata from our site.

Facebook scraping a Joomla site for metadata

This time our changes were reflected. From now on, every time anybody shares the same URL on Facebook, a link to your Facebook page will be added.

Step #3. End result

  • Copy the URL of your public site.
  • Paste it as a new post in Facebook.

a Joomla page shared on Facebook


About the author

Valentín creates beautiful designs from amongst the tequila plants of Jalisco, Mexico. You can see Valentín's design work all over this site and you can often find him helping members in support.