htmlfacebook-opengraphmeta-tags

When I share my website on certain platforms, there is no preview


As stated in the title, when I share my website on platforms like Discord, Facebook, etc., there is no preview available. Does anyone know the reason behind this or how to resolve it?

For instance, when a tweet from Twitter is shared on Discord, it appears like this: enter image description here

When a page from my website is shared, it only appears as a simple link without any preview or information.

Thats my meta name codes:

> header -->
><!DOCTYPE html>
>     <html lang="en" class="fancybox-enabled">
>     <head>
>     <meta charset="UTF-8">
>     <meta http-equiv="X-UA-Compatible" content="IE=edge">
>     <meta name="viewport" content="width=device-width, initial-scale=1.0">
>     <title>mywebsite name | pagename blabla</title>
>     <meta name="description" content="&#34;blabla ..&#34;
> pagecontent">
>     <meta name="keywords" content="">
>     <meta name="robots" content="index, follow">
>     <meta name="revisit-after" content="7 Days">
>     <link rel="icon" href="/logo.ico" type="image/x-icon">

How should these codes be?

I tried meta name and it doesn't work.


Solution

  • You'll have better luck if you use Open Graph tagging. From the documentation:

    <meta property="og:url"                content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
    <meta property="og:type"               content="article" />
    <meta property="og:title"              content="When Great Minds Don’t Think Alike" />
    <meta property="og:description"        content="How much does culture influence creative thinking?" />
    <meta property="og:image"              content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />