我在我的网站上使用facebook分享按钮。我正在关注facebook文档来执行此操作。但它不是从元标记中获取内容,而是从我的网站中随机抽取内容。当我尝试通过facebook调试器调试共享URL它给了我两个警告,如下所示:
Inferred Property: The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
Missing Properties: The following required properties are missing: og:url, og:type, og:title, og:image, og:description, fb:app_id
但下面是元标记,我正在该页面上使用,我想分享。
<meta property="og:description" content="Welcome to the world of computer science." />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.mywebsite.com" />
<meta property="og:image" content="https://tophat.com/wp-content/uploads/2017/05/BLOG_code.jpg" />
我使用aws服务器来托管我的website.htaccess启用是我的网站,我认为是因为这个。任何人都可以告诉我原因。
谢谢。
你好@Raja,
在我回顾您的问题时,您正在使用aws服务器,您在其中执行了htaccess身份验证。您只需要删除htaccess身份验证,然后使用Facebook调试工具再次废弃您的网站。它将帮助您从您的网站清除缓存。 This是facebook调试器的链接。
注意:您必须删除htaccess身份验证,因为Facebook仅从公共URL中抓取数据。