WDD 231: Web Frontend Development I

W02 Learning Activity: Social Media Meta

Overview

Open graph meta tags are used to support a rich preview to social media crawlers, like Facebook, with relevant information including a title, description, preview image, and locality.

Prepare

Without social media meta tags, the social media platform will attempt to guess the content of your page. It is better to provide the information explicitly.

The essential meta tags for social media include the following:

Facebook

Facebook uses Open Graph meta tags to provide a rich preview of your page when it is shared on their platform.

The following are common Open Graph (og) properties that you will include in your HTML pages:

X (Twitter)

Twitter uses Twitter social media cards or X Cards to provide a rich preview of your page when it is shared on their platform.

The following are common Twitter Card properties that you will include in your HTML pages:

Check Your Understanding

  1. What are Facebook Open Graph properties for the Church's main website at https://www.churchofjesuschrist.org for the title, description, and image?

    You can view the meta properties by navigating to the site and viewing the source,
    or you can enter the URL into a sharing debugger tool to provide a formatted report.

    Note that this content can change at any time. If you are not seeing the same content, do not worry as the principle and application are the important part of this exercise.

    Click for Answer
    Official open graph image of The Church of Jesus Christ of Latter-day Saints.

Activity Instructions

  1. Open your course home page from the previous week's assignment. (index.html)
  2. Add these Open Graph meta properties to the document:
    1. title
    2. description
    3. image
    4. url
  3. Test and review your Open Graph meta information by using the Sharing Debugger tool on developers.facebook.com. Fix any issues that are reported by the tool.

    You can ignore any missing property indicators about using a Facebook App Id,
    for example, fb:app_id

Optional Resources