ahm*_*md0 0 facebook meta-tags facebook-opengraph
我将以下内容添加到首页的HTML中(从页面顶部开始):
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="description" content="Blah-Blah-Blah This is my web site">
<meta name="keywords" content="why,does,facebook,suck,so,much">
<meta name="distribution" content="Global">
<meta name="revisit-after" content="30 days">
<meta name="rating" content="General">
<meta name="robots" content="follow,index">
<meta name="author" content="www.me-at-my-wonderful-site.com">
<meta property="og:title" content="My Title" />
<meta property="og:type" content="company" />
<meta property="og:url" content="http://www.my-company-url.com/" />
<meta property="og:image" content="http://www.my-company-url.com/images/facebook_pic.png" />
<meta property="og:site_name" content="My Company Name" />
<meta property="og:description" content="Blah-Blah-Blah" />
<meta property="fb:app_id" content="123456789012345"/>
<meta property="og:latitude" content="56.340609"/>
<meta property="og:longitude" content="-152.435136"/>
<meta property="og:street-address" content="123 1st St."/>
<meta property="og:locality" content="Seattle"/>
<meta property="og:region" content="WA"/>
<meta property="og:postal-code" content="98765"/>
<meta property="og:country-name" content="USA"/>
<meta property="og:phone_number" content="360-123-4567"/>
<title>Title for my web page - Home Page</title>
<link href="icon.ico" rel="SHORTCUT ICON">
<link href="styles.css" type=text/css rel=stylesheet>
<!-- Regular HTML follows -->
Run Code Online (Sandbox Code Playgroud)
假设登录http://www.my-company-url.com可以访问以下内容,我可以在Web浏览器中查看上面的HTML(查看源代码).但是,当我将相同的URL加载到http://developers.facebook.com/tools/debug时,我得到以下内容:
Errors That Must Be Fixed
Object Invalid Value: Object at URL 'http://www.my-company-url.com' of type 'website' is invalid because the given value '123456789012345' for property 'fb:app_id' could not be parsed as type 'fbid'.
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.
Run Code Online (Sandbox Code Playgroud)
然后这个
Warnings That Should Be Fixed
Extraneous Property: Objects of this type do not allow properties named og:latitude.
Extraneous Property: Objects of this type do not allow properties named og:longitude.
Extraneous Property: Objects of this type do not allow properties named og:street-address.
Extraneous Property: Objects of this type do not allow properties named og:locality.
Extraneous Property: Objects of this type do not allow properties named og:region.
Extraneous Property: Objects of this type do not allow properties named og:postal-code.
Extraneous Property: Objects of this type do not allow properties named og:country-name.
Extraneous Property: Objects of this type do not allow properties named og:phone_number.
Run Code Online (Sandbox Code Playgroud)
现在WTF是这个吗?我没有在我的HTML中指定上面的所有参数??? 正如你所看到的,我把它变成了"公司"而不是"网站"......
PS.123456789012345不是我的真实facebook ID,但它与我的实际ID具有相同的位数.
对象无效值:"网站"类型的URL"http://www.my-company-url.com"上的对象无效,因为属性"fb:app_id"的给定值"123456789012345"无法解析为"类型" FBID".
123456789012345不是我的真实facebook ID,但它与我的实际ID具有相同的位数.
该fb:app_id标签被认为是一个Facebook应用程序的ID号,而不是你个人的Facebook个人资料的ID.如果您想通过Facebook个人资料管理页面,您应该使用fb:admins,而不是fb:app_id.我怀疑这个错误会产生某种级联效应,阻止Facebook的解析器处理其余的OpenGraph标记.
有关更多详细信息,请参阅Facebook的OpenGraph文档的页面管理部分.
| 归档时间: |
|
| 查看次数: |
10748 次 |
| 最近记录: |