gpt4 book ai didi

facebook-opengraph - Facebook对象调试器:无法将属性 'og:url'解析为 'url'类型

转载 作者:行者123 更新时间:2023-12-03 12:10:03 24 4
gpt4 key购买 nike

当我通过对象调试器运行我的Facebook Open Graph对象(http://www.21dads.com/testobject)时,出现以下错误:

Object Invalid Value: Object at URL 'http://www.21dads.com/testobject' of type 'thetestasdf:recipie' is invalid because the given value 'www.21dads.com/testobject' for property 'og:url' could not be parsed as type 'url'.

Missing Required Property: The og:url property is required, but not present.

Missing Required Property: The og:type property is required, but not present.

Missing Required Property: The og:title property is required, but not present.



这是对象页面上的HTML:
<html xmlns="http://www.w3.org/1999/xhtml">

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# thetestasdf: http://ogp.me/ns/fb/thetestasdf#">
<meta property="fb:app_id" content="325291980834949" />
<meta property="og:type" content="thetestasdf:recipie" />
<meta property="og:url" content="www.21dads.com/testobject" />
<meta property="og:title" content="Cookie Recipie!" />
<meta property="og:description" content="Tastiest recipe ever" />
<meta property="og:image" content="http://cdn.techpatio.com/wp-content/uploads/2009/11/cookie_law_eu.gif" />
<title> Cookie Recipie</title>
<head/>

<body>
<p> Test object page </p>
</body>

</html>

URL“www.21dads.com/testobject”是我的 Controller ,该 Controller 然后从 View 文件生成HTML。为什么无法解析此URL?

为什么已经包含其他“缺少必需的属性”错误?

谢谢。

最佳答案

您应该在og:url内容(例如http://https://)的前面有方案,否则这不是URL。

在您的特定情况下,应将www.21dads.com/testobject替换为http://www.21dads.com/testobject

关于facebook-opengraph - Facebook对象调试器:无法将属性 'og:url'解析为 'url'类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9038025/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com