Facebook对象调试器:无法将属性"og:url"解析为类型"url" [英] Facebook Object Debugger: property 'og:url' could not be parsed as type 'url'
问题描述
通过对象调试器运行Facebook Open Graph对象(http://www.21dads.com/testobject)时,出现以下错误:
When I run my Facebook Open Graph object (http://www.21dads.com/testobject) through the Object Debugger, I'm getting the following errors:
对象无效值:URL'http://www.21dads.com/testobject'上的对象 类型'thetestasdf:recipie'无效,因为给定的值 无法解析属性"og:url"的"www.21dads.com/testobject" 作为"url"类型.
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'.
缺少必需属性:og:url属性是必需的,但不是必需的 礼物.
Missing Required Property: The og:url property is required, but not present.
缺少必需的属性:og:type是必需的,但不是必需的 礼物.
Missing Required Property: The og:type property is required, but not present.
缺少必需的属性:og:title属性是必需的,但不是必需的 礼物.
Missing Required Property: The og:title property is required, but not present.
这是对象页面上的HTML:
Here is the HTML on the object page:
<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"是我的控制器,该控制器然后从视图文件生成HTML.为什么无法解析此URL?
The URL "www.21dads.com/testobject" is my controller which then generates the HTML from a view file. Why can't this URL be parsed?
为什么我已经收到其他缺少必需的属性"错误?
Why am I getting the other "missing required property" errors when they are already included?
谢谢.
推荐答案
您应该在og:url
内容(例如http://
或https://
)之前使用方案,否则它不是URL.
You should have scheme in front of og:url
content (like http://
or https://
), or this isn't URL.
在您的特定情况下,应将www.21dads.com/testobject
替换为http://www.21dads.com/testobject
In your specific case you should replace www.21dads.com/testobject
with http://www.21dads.com/testobject
这篇关于Facebook对象调试器:无法将属性"og:url"解析为类型"url"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!