我的标签上有以下行。
<?php
echo "<meta property='og:title' content='".$metaTitle."'>";
echo "<meta property='og:type' content='".$metaType."'>";
echo "<meta property='og:url' content='".$metaURL."'>";
echo "<meta property='og:image' content='".$metaImage."'>";
echo "<meta property='og:site_name' content='Gellies World'>";
echo "<meta property='og:description' content='".$metaDescription."'>";
?>
当我查看源代码时,它可以正确打印(尽管它完全打印在一行中)。
<meta property='og:title' content='Ka-Ching! Sound of the Casino slot machine~!'><meta property='og:type' content='article'><meta property='og:url' content='http://gelliesworld.com/library/read/31'><meta property='og:image' content='http://gelliesworld.com/users/library/poster/images_thumb.jpeg'><meta property='og:site_name' content='Gellies World'><meta property='og:description' content='A group of Japanese lawmakers are close to hitting the jackpot in their bid to legalise casinos, betting the revenue bonanza could challenge Macau for'>
但是,当我使用 FB 调试器调试 url 时,它说我有必须修复的错误:
- 正文中的元标记
还有一些警告
- 推断属性
当我看到抓取的 URL 时,源代码与我右键单击并查看源代码时的显示不相似
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<meta property="og:title" content="<div style=" border:1px solid>
</head>
<body>
<p>">
等等.....
我正在使用 CodeIgniter,并且有 3 个视图(页眉、the_content 和页脚)。谁能指出似乎是什么问题?