Understanding Open Graph Meta Tags
Open Graph tags allow websites to control how their pages appear when shared on social media platforms like Facebook, LinkedIn, and X. Implementing these tags ensures your content is presented beautifully and informatively.
🌟 Essential Tags
og:title
- The title of your page as it should appear in the share preview.og:description
- A brief summary of the page content.og:image
- The URL of a preview image displayed with the shared link.og:url
- The canonical URL of your page.
🧩 Optional Enrichment Tags
og:type
- Indicates the type of content (e.g.,article
,video
,website
).og:site_name
- The name of your website or brand.og:locale
- Language and locale of the content (e.g.,en_GB
,ja_JP
).og:image:type
- MIME type of the image (e.g.,image/webp
,image/png
).og:image:width
&og:image:height
- Image dimensions in pixels for optimal display.
📱 Social Platform-Specific Tags
fb:app_id
- Required by Facebook to track shared links and integrate with apps.twitter:card
- Defines Twitter card type (summary
,summary_large_image
, etc.).twitter:title
- Title for Twitter card display.twitter:description
- Description for Twitter card.twitter:image
- Image URL for Twitter preview.
🛠️ Best Practices
- Use absolute URLs for all content references.
- Match the preview image to recommended dimensions: 1200×630 for best coverage.
- Validate your tags using Facebook’s Sharing Debugger or Twitter's Card Validator.