【问题标题】:cannot get opengraph to scape url无法打开图形来转义 url
【发布时间】:2012-05-09 02:17:56
【问题描述】:

我知道这是一个很常见的问题,但我尝试过的任何解决方案(很多)都没有奏效。

我正在尝试使用 https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fresidencyradio.com%2F 抓取 http://residencyradio.com/

网站本身正在进行全面检修,这将在下周揭晓该网站第一次被缓存在 FB 上(大约一年前)。

据我所知,我已经包含了所有相关的元标记等,我什至尝试在网站上实现一个like 按钮,但无济于事。我已按照以下内容进行操作:http://ogp.me/,看不出有什么问题。

这是从!DOCTYPE</head> 的页面的sippet:

<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<meta charset=utf-8>
<title>The Residency</title>

<!--[if IE]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
    </script>
<![endif]-->
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/png" href="images/favicon.png" />


<!--Meta Data-->
<meta name="keywords" content="The Residency, M. Budden, Neal McClelland, Michael Budden, Radio, Residency Radio, 
Residency, Global, House, Electro, Progressive, Tech, Techno, DnB, Drum and Base, Dubstep, iTunes, Belfast, 
Northern Ireland, UK" /> 
<meta name="description" content="Brought to you by Neal McClelland and M. Budden, The Residency is a weekly global underground dance show" />
<meta property="og:title" content="The Residency A global underground dance show" />
<meta property="og:type" content="musician" />
<meta property="og:url" content="https://www.facebook.com/theresidency" />
<meta property="og:image" content="https://www.residencyradio.com/images/Residency_logo_circle.png" />
<meta property="og:site_name" content="The Residency" />
<meta property="fb:admins" content="1324839758" />

任何帮助将不胜感激,因为几天来我一直在摸索着想弄清楚!

提前致谢!

【问题讨论】:

  • 奇怪,当我尝试调试它时,我得到:“解​​析 URL 时出错:解析输入 URL 时出错,没有数据被抓取。”

标签: facebook html facebook-graph-api facebook-opengraph


【解决方案1】:

这是一个猜测,但您的 html 无效,可能是因为 facebook 抓取工具无法解析并从中提取数据。

我还没有完成所有这些,但你似乎没有关闭所有标签。 例如,描述和关键字元标记不以“/>”或“>”结尾。


编辑

当我从我的服务器加载您的 html 时调试器显示的屏幕截图:

【讨论】:

  • 是的,你是对的,这些标签没有正确关闭,我现在已经纠正了这个问题,但它仍然没有区别:/
  • 我不知道该告诉你什么,我在使用调试工具时不断收到该错误。我将确切的页面保存在我的服务器上,并在上面尝试了调试器,它返回了正确的数据。看起来 facebook 无法访问您的服务器,但我不知道为什么。
  • 哦,真奇怪!我将不得不就此联系我的提供商,找不到任何问题。谢谢老哥的帮助!
  • 您是否有机会截取它向您显示的内容?我可以让它为residencyradio.com/index.html 抓取信息,但它给了我一个 406 响应。
猜你喜欢
  • 2011-10-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-25
相关资源
最近更新 更多