Facebook Connect 调试器和网站不会使用元标签
可能的重复:
Facebook Sharer 如何选择图像?
我正在尝试使用 Facebook正确评论 Drupal 网站。评论框显示并完全按照我想要的方式工作,但是当我转到 facebook 调试器 http:// /developers.facebook.com/tools/debug 它告诉我没有设置任何必需的开放图元标记(og:title 等)。它无法识别任何元标记,这也意味着我无法使用 fb:admins 标记来审核评论。
如果我遗漏了任何需要的信息,请告诉我!我在这里感到非常沮丧,花了大约 3 分钟才让 Facebook 评论正常工作,现在几个小时的工作仍然没有解决这个问题。 。 。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title><?php print $head_title ?></title>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<meta property="fb:app_id" content="{my app id}" />
<meta property="fb:admins" content="{my facebook id}"/>
<meta property="og:title" content="<?php echo $title; ?>" />
<meta property="og:type" content="sports_team" />
<meta property="og:url" content="<?php echo $url; ?>" />
<meta property="og:image" content="http://example.com/logo-200.jpg" />
<meta property="og:site_name" content="Site Name" />
Possible Duplicate:
How does Facebook Sharer select Images?
I'm trying to use Facebook Comments on a Drupal website correctly. The comment box shows up and works exactly as I want it to, but when I go to facebook debugger http://developers.facebook.com/tools/debug it tells me that none of the required open graph meta tags (og:title, etc.) are set. It's not recognizing any of the meta tags, which also means I can't use the fb:admins tag to moderate comments.
My problem sounds very similar to this one: Missing og meta tags when running debug but I manually set the Content-Length parameter using PHP and the meta Tags still are not being recognized by facebook. I'm running PHP 5.2.9, and I have NO access to upgrading or editing it at all. (University environment, they're a trifle slow and obfuscating when asking for server changes.) I've found multiple questions on Stack Overflow along similar lines, and have tried implementing all the suggested fixes to no avail, any help would be appreciated!
Please let me know if I left out any needed info! I'm getting quite frustrated here, it took about 3 minutes flat to get the facebook comments to work, and now hours and hours of work still haven't resolved this issue. . .
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title><?php print $head_title ?></title>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<meta property="fb:app_id" content="{my app id}" />
<meta property="fb:admins" content="{my facebook id}"/>
<meta property="og:title" content="<?php echo $title; ?>" />
<meta property="og:type" content="sports_team" />
<meta property="og:url" content="<?php echo $url; ?>" />
<meta property="og:image" content="http://example.com/logo-200.jpg" />
<meta property="og:site_name" content="Site Name" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将这些元标记放在我的页面上是有效的,所以我认为您的标记是正确的。
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fpaulisageek.com%2Ftmp%2Fso_7517794.php
也许您正在发布内容在
之前?或者您的网络服务器无法很好地响应带有
Range:
标头的 HTTP 查询?检查您的访问日志,了解 Facebook 正在执行的确切查询,以了解要测试的内容。Putting those meta tags on my page worked so I think you have the tags correct.
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fpaulisageek.com%2Ftmp%2Fso_7517794.php
Maybe you are issuing content before the
<head>
? Or your webserver isn't responding well to an HTTP query with aRange:
header? Check your access logs for the exact query Facebook is making to see what to test.