These meta tags: og:title, og:image, og:url, og:description, etc will define information what we want to share on social sites such as Facebook.
The meta tags should be managed and placed within the <head> … </head> section of every web page.
Example of meta tags for social sharing
<html> <head> <title>Adding Meta Tags For Social Sharing</title> <meta property="og:title" content="4 Rapid Development" /> <meta property="og:site_name" content="4rapiddev" /> <meta property="og:description" content="Just a demo for adding meta tags for social sharing" /> <meta property="og:url" content="http://4rapiddev.com/" /> <meta property="og:image" content="http://4rapiddev.com/wp-content/themes/4rapiddev/images/logo.png" /> </head> <body> </body> </html> |
In the example above, meta tags for social sharing are:
- og:title: the title of the page; should be the same with webpage title
- og:site_name: the website name, not URL
- og:description: the description of what you want to share. Should be the same with description meta tag
- og:url: the URL of the page
- og:image: the URL of image which represents for the shared content
For more information, please reference 2 links below to get best practices on social sharing: