【问题标题】:Facebook Like not Pulling TitleFacebook Like 不拉标题
【发布时间】:2011-02-22 00:59:23
【问题描述】:

我在使用新的 facebook like 按钮时遇到了一些问题。它显示得很好,但是由于某种原因它没有拉出页面的标题。

我有并且我正在使用 og:title,所有内容都已填写,当我查看在加载按钮时创建的 iframe 的源时,里面是空白的。我也在尝试放置 tweetmeme,并且看到的是该标题而不是元数据或普通页面标题。

我做错了什么?

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/">

<fb:like href="<?=$url?>" layout="button_count" show_faces="false" width="100" font="arial"></fb:like>

更新:完成头部

<head>


<title>Ladder 15 Gets A New Menu!</title>
<meta content="Growing up can be hard to do, especially in the Mad River family. But Ladder 15 has come into its own over the winter.&nbsp; With some new cocktails, wine selection, a hefty new beer list and veteran Chef David Ansill in the kitchen, you can check your fist pump at" name="Description">
<meta content="" name="Keywords">
<meta content="cities2night inc." name="author">
<meta content="Cities2Night 2010" name="copyright">
<meta content="en-us" name="language">
<meta content="General" name="rating">
<meta content="index,follow" name="robots">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="Ladder 15 gets a new menu!" name="tweetmeme-title">
<meta content="Ladder 15 gets a new menu!" property="og:title">
<meta content="article" property="og:type">
<meta content="http://philly.cities2night.com/articles/show/listing/11/ladder-15-gets-a-new-menu" property="og:url">
<meta content="http://philly.cities2night.com/public/article_images/11.jpg" property="og:image">
<meta content="c0176da0ec38aaf107c0ef6c8cdeee38" property="fb:app_id">
<meta content="Philly2night.com" property="og:site_name">
<meta content="Growing up can be hard to do, especially in the Mad River family. But Ladder" property="og:description"></head>

【问题讨论】:

  • 我在你的代码中没有看到标题应该是......

标签: php javascript facebook


【解决方案1】:

您使用的是开发 URL 吗? This 是我访问您的“og:url”指定的链接时看到的页面,该链接的标题为“Philly2night.com 的文章”,并且没有指定打开的图元数据。我想这可能是一个问题,因为 Facebook 可能会尝试从可用 URL 中提取信息。

此外,对于您列出的已获得大量“赞”的页面,您可能会遇到此问题:

您可以更新您的属性 通过更新您的页面 标签。注意 og:title 和 og:type 最初只能编辑 - 之后 该页面收到 10 个赞,这些 属性变得固定以避免 令喜欢的用户感到惊讶 页面已经,并更改标题 或类型标签将导致您的页面 失去任何现有的喜欢。

来自FB Open Graph Protocol explanation

【讨论】:

  • 我正在使用一个开发站点,我现在将其硬编码为 1 个 url,似乎仍然拉错了标题,它影响了 twitter,因为它看到了最后一个标题标签。
  • philadelphia.cities2night.com/articles/show/article/11/… 这是一个示例 URL,我看到了所有的 og 数据,并且标题是正确的,但如果你喜欢它,它仍然会显示“Philly2night.com 的文章”,这令人沮丧。
  • 缓存可能是个问题。它现在在 FB 上正确共享链接(带有标题)(而且不是更早),所以也许“喜欢”功能很快就会出现。
  • 这是另一个philadelphia.cities2night.com/articles/show/article/12/… 同样的事情,它正在做我猜是缓存,但我已经好几天没有更改代码了。所以不知道为什么它会拉它。如果是我们的缓存浏览器,或者 Facebook 的,正如你在 twitter 上看到的那样,它仍然是错误的。
  • 查看编辑后的答案...可能也与您已经归因于该页面的点赞数有关。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多