Open graph protocol not working in whatsapp

2019-09-20 04:17发布

问题:

I Follow the below open graph meta tags to show thumbnail on sharing. It works perfectly in facebook but not in whatsapp

  <meta property="og:site_name" content="Hahaa haa">
  <meta property="og:title" content="Haaha haa - Music Player" />
  <meta property="og:url" content="http://13.126.57.106/aiyoapp/public/" />
  <meta property="og:description" content="Haaha haa Music Player is used to share">
  <meta property="og:image" itemprop="image"  content="http://13.126.57.106/aiyoapp/public/images/ha_thumb.png">
  <meta property="og:type" content="website" />

回答1:

I have had the same problem, everything worked fine in any opengraph testing tool and in the social sites themself's: facebook, twitter, ok, vk but in whatsapp & telegram not.

So after a lot of research, the problem was in our virtual site firewall that protects from site crawling by many logics, a couple of them is IP and User-Agent. The whatsapp & telegram are pinging sites to fetch og data are not throw their servers like social sites, but through your mobile operator's dynamic IP, but the user-agent is of the messenger itself, and it was in our automatically generated blacklist.

Check if you don't ban access to your site by theirs user-agents string that contains: WhatsApp/2.17.395 A or TelegramBot (like TwitterBot)

Wish it helped.