Use Open Graph TagsOpen Graph, or OG, tags are essentially a type of meta data that tells Facebook what to share from your page instead of letting their crawler decide for you (something that Facebook readily admits may grab text and images that are “basic and incorrect”). By using OG tags in the HTML of your content, you can tell Facebook what to share and how to display it. Here are some essential OG tags and what they can do for you:
- og:title – The title that will be displayed, without branding or the domain being shared from.
- og:site_name – The site name that will be displayed.
- og:url – The display URL. All shares on Facebook will use this as the identifying URL. Do not use any session variables.
- og:description – The description for your content that will be displayed on Facebook. This should be at least two sentences long.
- og:image – The URL of the image you want displayed with your content.
- og:type – This will affect how your content is displayed. The default content type is website, which works in many cases. However, by setting a type that most closely matches your content, it opens up additional options such as offering the ability to ‘Like’ or ‘Follow’ your Facebook page to anyone who reads or shares the content. A full list of Open Graph object types can be found here.
- og:author or og:publisher – If you have set your content type to “og:article”, these tags will let you link to the Facebook page for the author or publisher and offer anyone viewing or sharing your content on Facebook the opportunity to like or follow them.