Facebook Connect 调试器和网站不会使用元标签

发布于 2024-12-06 03:48:25 字数 1802 浏览 0 评论 0原文

可能的重复:
Facebook Sharer 如何选择图像?

我正在尝试使用 Facebook正确评论 Drupal 网站。评论框显示并完全按照我想要的方式工作,但是当我转到 facebook 调试器 http:// /developers.facebook.com/tools/debug 它告诉我没有设置任何必需的开放图元标记(og:title 等)。它无法识别任何元标记,这也意味着我无法使用 fb:admins 标记来审核评论。

我的问题听起来与此非常相似:运行调试时缺少 og 元标记 但我使用 PHP 手动设置 Content-Length 参数,并且 facebook 仍然无法识别元标签。我正在运行 PHP 5.2.9,但我根本无法升级或编辑它。 (在大学环境中,当要求更改服务器时,它们有点慢且令人困惑。)我在 Stack Overflow 上发现了多个类似的问题,并尝试实施所有建议的修复,但没有成功,任何帮助将不胜感激!

如果我遗漏了任何需要的信息,请告诉我!我在这里感到非常沮丧,花了大约 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苦妄 2024-12-13 03:48:25

将这些元标记放在我的页面上是有效的,所以我认为您的标记是正确的。

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 a Range: header? Check your access logs for the exact query Facebook is making to see what to test.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文