【发布时间】:2011-12-24 06:04:23
【问题描述】:
我知道这个问题之前已经被问过几十次了,我知道是因为我浏览了这个网站以及其他人广泛地寻找答案。我已经尝试了所有遇到的技巧,但我仍然完全感到困惑(并且一天比一天更沮丧)。
这是我的主页:http://teampowerpuffboys.com/(这是一个 WordPress 网站,FWIW)。 以下是
的摘录,其中包含必要的命名空间声明和 OG 标签:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en' xml:lang='en' xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://ogp.me/ns#' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="en" />
<meta content='no-cache' http-equiv='Cache-Control' />
<meta content='no-store' http-equiv='Cache-Control' />
<title>Home | Team Powerpuff Boys | Real Men Wear Fuchsia!</title>
<meta property="og:site_name" content="Team Powerpuff Boys" />
<meta property="og:url" content="http://teampowerpuffboys.com/" />
<meta name="title" content="Home | Team Powerpuff Boys" />
<meta property="og:title" content="Home | Team Powerpuff Boys" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://lh6.googleusercontent.com/-AemlgCQVQFA/TnS4miADMJI/AAAAAAAAAWE/_xrSA0ctNeU/logo.png" />
<link rel="image_src" type="image/jpeg" href="http://lh6.googleusercontent.com/-AemlgCQVQFA/TnS4miADMJI/AAAAAAAAAWE/_xrSA0ctNeU/logo.png"/>
<meta property="fb:admins" content="777890474" />
<meta property="fb:app_id" content="164049423677441" />
通过 URL Linter 运行它,你会得到非常不满意的结果。 (请将 url 复制并粘贴到 Linter 中查看结果,我无法在此处提供链接,因为显然我每个帖子只能添加 2 个超链接)
这是关键:我复制了该页面的 HTML,将其粘贴到静态 HTML 页面,然后在此处上传:http://teampowerpuffboys.com/test.html
该页面中的代码完全相同,只是我在 og:url 标签中添加了“test.html”以反映当前页面。但是你瞧,现在我在 URL linter 中得到了想要的输出!! (请将 url 复制并粘贴到 Linter 中查看结果,我无法在此处提供链接,因为显然我每个帖子只能添加 2 个超链接)
对于我的生活,我无法理解问题是什么?为什么它适用于静态 HTML 页面,而不适用于包含完全相同输出的 Wordpress 页面?这可能与 WordPress 永久链接有关吗?我试过用谷歌搜索,但没有得到更多信息。我已经处理这个问题一个多月了,但最终我的绳索/耐心已经结束,这就是为什么我决定最终发布并希望有人能指出我的代码或逻辑中明显的遗漏。谢谢。
【问题讨论】:
标签: wordpress facebook-like facebook-opengraph