Search code examples
htmlmeta

How to get link card using meta


I have a web site with a few pages and for example if I want to share with somebody one of my link and send it via whatsapp, I need to see logo and some text in my message. [as it on this image]

enter image description here

How can I do that?

I just have found this sample:

<link rel="shortcut icon" href="img/img.svg">
<link rel="apple-touch-icon image_src" href="img/img.svg">
<meta name="twitter:title" property="og:title" itemprop="name" content="Link to source">
<meta name="twitter:description" property="og:description" itemprop="description" content="Mycontent">

Solution

  • You have to add some meta tags.

    <meta property="og:site_name" content="Your site name">
    <meta property="og:title" content="Page title" />
    <meta property="og:description" content="Page description" />
    <meta property="og:image" itemprop="image" content="your_page_image.png">
    <meta property="og:type" content="website" />