开放图协议在WhatsApp中不起作用 [英] Open graph protocol not working in whatsapp

查看:103
本文介绍了开放图协议在WhatsApp中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照下面的打开的图形元标记显示共享时的缩略图. 它在Facebook中完美运行,但在whatsapp中却不行

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" />

推荐答案

我遇到了同样的问题,在任何opengraph测试工具以及他们自己的社交网站中,一切工作正常:facebook,twitter,ok,vk,但在whatsapp和;没有电报.

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.

因此,经过大量研究,问题出在我们的虚拟站点防火墙中,该防火墙通过许多逻辑来防止站点爬网,其中包括IP和User-Agent. whatsapp&电报ping站点以获取数据不会像社交站点那样将其扔到服务器上,而是通过移动运营商的动态IP进行,但是用户代理属于Messenger本身,并且位于我们自动生成的黑名单中.

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.

通过包含以下内容的用户代理字符串检查是否不禁止其访问网站: WhatsApp/2.17.395 A TelegramBot(例如TwitterBot)

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)

希望有帮助.

这篇关于开放图协议在WhatsApp中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆