如何自定义 Facebook Like 按钮消息
我遵循 FB 教程的建议,甚至使用了他们的开放图形生成器:
http ://developers.facebook.com/docs/reference/plugins/like/
但我的点赞消息不使用此数据。它使用了我不久前更改过的网站上的过时信息。
我刚刚添加了开放图标签,它们看起来像这样:
<meta property="og:title" content="Test Title" />
<meta property="og:type" content="activity" />
<meta property="og:url" content="http://foo.com" />
<meta property="og:image" content="http://foo.com/images/image.jpg" />
<meta property="og:site_name" content="Foo" />
<meta property="og:description" content="Hey, check out this thing" />
<meta property="fb:admins" content="Foo" />
然而,当我将我的网站输入 Linter 时,它说我缺少所有必需的元标签(标题、类型 url 等)。
它说需要 24 小时才能抓取,所以也许我只需要等待,但它还说如果我将我的网站输入 Linter,它就会立即工作。
我做错了什么?
I'm following the advise of FB's tutorial here and I even used their open graph generator:
http://developers.facebook.com/docs/reference/plugins/like/
but my like message does not use this data. It uses outdated info from the site that I've changed awhile ago.
I've just added my open graph tags and they look like this:
<meta property="og:title" content="Test Title" />
<meta property="og:type" content="activity" />
<meta property="og:url" content="http://foo.com" />
<meta property="og:image" content="http://foo.com/images/image.jpg" />
<meta property="og:site_name" content="Foo" />
<meta property="og:description" content="Hey, check out this thing" />
<meta property="fb:admins" content="Foo" />
And yet when I enter my site into Linter, it says I'm missing all the required meta tags (title, type url, etc).
It says it takes 24 hours to scrape so maybe I just need to wait but it also said that if I enter my site into Linter that it'll work right away.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您通过 linter 运行您的网址,它会自动抓取您的页面并使用您的新的 OG 标签。如果您没有看到此行为,则可能是一个错误,或者您没有输入包含这些 OG 标签的页面所在的确切 URL,或者您的“赞”按钮引用了过时的 URL。
If you run your url through the linter it will automatically scrape your page and update facebook's cache with your new OG tags. If you're not seeing this behavior, it's either a bug or you're not entering the exact url where your page exists containing these OG tags, or your like button references an outdated URL.