【问题标题】:Meta Tags In Body正文中的元标记
【发布时间】:2012-04-06 21:27:07
【问题描述】:

我正在尝试在我的网站 www.nacts.com.au 上添加我的点赞按钮以添加到我们 Facebook 页面上的按钮,但收到此消息:

您的 .这可能是因为您的格式错误并且它们在解析树中的位置较低,或者您不小心将 Open Graph 标签放在了错误的位置。无论哪种方式,您都需要在标签可用之前对其进行修复。

但其实PHP下是这样放置的

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/" "html xmlns:fb="http://ogp.me/ns/fb#" >
    <head>
    <title>North Australia Career &amp; Training Services</title>
     <meta property="fb:app_id" content="191402794307447" />
     <meta property="og:title" content="North Australia Career & Training Services" />
     <meta property="og:type" content="website" />
     <meta property="og:url" content="http://www.nacts.com.au" />
     <meta property="og:image" content="http://nacts.com.au/images/NACTS4.png" />
     <meta property="og:site_name" content="NACTS" />
     <meta property="fb:admins" content="566419298" /> 
     <meta property="og:description" content="North Australia Career & Training Services"> 
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="msvalidate.01" content="3123382E32539EBE8C53C2CA69F7510D" />
     <meta name="google-site-verification" content="bExkQFnEooJVIoZIm70CO8H8Yjx_FfyyCC6hNE_SeoA" />
     <meta name="keywords" content=" training rockhampton, training rocky, rockhampton training,training,train,career development,mining,course,Resumes, Resumes Rockhampton, Tenders,Tender Writing, Marketing,business services,Rockhampton Business Services ,Courses,North Rockhampton Training,Industry Courses,Workplace Development,Rockhampton Career Advice,Career Development Rockhampton,RPL,North Australia,career,training Services,funding, Grants" />
</head>     

我做错了什么?

【问题讨论】:

    标签: facebook-like meta-tags facebook-opengraph


    【解决方案1】:

    您的问题的答案在错误描述中。您必须在 HTML 代码的 &lt;head /&gt; 部分中嵌入 og: 元标记。请在此处阅读有关开放图形标签如何工作的更多信息:http://ogp.me


    编辑

    根据对问题的修改,现在知道 www.nacts.com.au 的 URL,排除故障要容易得多。

    我确实看到了一个元标记,它位于 BODY 部分而不是 HEAD 部分。是&lt;meta property="fb:page_id" content="148187795268337"&gt;

    【讨论】:

    • 对不起,我听不懂?
    • 1) 您是否阅读了 ogp.me 网站? 2) 你知道如何编辑 HTML 吗?
    • 感谢您的帮助,我非常感谢。是的,我已经阅读了该网站,只是让自己更加困惑。我不是编码员,但我确实建立了网站,所以是的,我知道如何编辑 HTML。我仍然想念/看不到问题出在哪里,这让我发疯了。
    • 你把og标签放在head部分了吗?您能否编辑问题添加您为 og 标签添加的 html 代码?
    • 我已经放置了更新的代码。这似乎很琐碎,但不确定我错过了什么?
    猜你喜欢
    • 2012-10-01
    • 2016-05-30
    • 2012-07-22
    • 1970-01-01
    • 1970-01-01
    • 2015-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多