推断属性 即使可以从其他标签推断出值,也应显式提供“og:image”属性。
缺少属性缺少以下必需属性:og:url、og:type、og:title、og:image、og:description、fb:app_id在此处输入图像描述
这不是 php 的事情。这是一个 html 元数据。
您的.html/.php文件必须看起来像这样..
例子:
<html prefix="og: https://ogp.me/ns#">
<head>
<title>Your website title</title>
<meta property="og:title" content="Your website title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.your-url.com/" />
<meta property="og:image" content="https://www.your-url.com/image.jpg" />
<meta property="fb:app_id" content="your_facebook_app_id" />
...
</head>
<body>
...
</body>
</html>
阅读此处了解更多信息:https ://ogp.me/