如何在第一次设置 og:type 的同时不失去点赞数?

发布于 2024-10-19 19:43:13 字数 1889 浏览 0 评论 0 原文

当我第一次创建我的网站时,我忽略了添加 Facebook 推荐的 Open Graph 标签 (http://developers.facebook.com/docs/opengraph/),该网站现在通过 fb:comments 小部件获得了大约 1200 个 Facebook 点赞。 http://graph.facebook.com/http://feedtheanimalssamples.com/ 显示了这一点:

{
   "id": "http://feedtheanimalssamples.com/",
   "shares": 1204
}

最近,我添加了以下 OG 标签:

<meta property="fb:app_id" content="59193243341" />
<meta property="og:title" content="Girl Talk - Feed The Animals Samples (old)" />
<meta property="og:image" content="http://feedtheanimalssamples.com/fta_small.png" />
<meta property="og:url" content="http://feedtheanimalssamples.com" />

但是当我添加 og:type 标签:

<meta property="og:type" content="website" />

和 Lint 网站时,我失去了所有的喜欢。 http://graph.facebook.com/http://feedtheanimalssamples.com/ 开始显示:(

{
   "id": "170545342993850",
   "name": "Girl Talk - Feed The Animals Samples",
   "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/188039_170545342993850_3277642_s.jpg",
   "link": "http://www.facebook.com/pages/Girl-Talk-Feed-The-Animals-Samples/170545342993850",
   "category": "Website",
   "website": "http://feedtheanimalssamples.com/",
   "description": "Interactively identifies the samples in the 2008 album 'Feed The Animals' by mashup artist Girl Talk.",
   "likes": 1
}

注意“喜欢”:1。)

那么:如何设置 og:type 而不丢失我的喜欢?

我试图让我的喜欢者知道我已经创建了一个经过改进的新网站。我正在按照 http://developers.facebook.com/blog/post/397< 上的说明进行操作/a> 在“通过 Graph API 发布到连接的用户”下,但使用该 API 显然需要指定 og:type。

谢谢!

When I first created my site, I neglected to add the Open Graph tags that Facebook recommends (http://developers.facebook.com/docs/opengraph/), and the site now has about 1200 Facebook likes through a fb:comments widget. http://graph.facebook.com/http://feedtheanimalssamples.com/ shows this:

{
   "id": "http://feedtheanimalssamples.com/",
   "shares": 1204
}

Recently, I've added added the following OG tags:

<meta property="fb:app_id" content="59193243341" />
<meta property="og:title" content="Girl Talk - Feed The Animals Samples (old)" />
<meta property="og:image" content="http://feedtheanimalssamples.com/fta_small.png" />
<meta property="og:url" content="http://feedtheanimalssamples.com" />

But when I add the og:type tag:

<meta property="og:type" content="website" />

and Lint the site, I lose all my likes. http://graph.facebook.com/http://feedtheanimalssamples.com/ starts showing this:

{
   "id": "170545342993850",
   "name": "Girl Talk - Feed The Animals Samples",
   "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/188039_170545342993850_3277642_s.jpg",
   "link": "http://www.facebook.com/pages/Girl-Talk-Feed-The-Animals-Samples/170545342993850",
   "category": "Website",
   "website": "http://feedtheanimalssamples.com/",
   "description": "Interactively identifies the samples in the 2008 album 'Feed The Animals' by mashup artist Girl Talk.",
   "likes": 1
}

(Note the "likes": 1.)

So: How do I set the og:type without losing my likes?

I'm trying to let my likers know that I've created a new and improved site. I'm following the instuctions at http://developers.facebook.com/blog/post/397 under "Publishing to Connected Users via Graph API", but using that API apparently requires specifying an og:type.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

青芜 2024-10-26 19:43:13

我对此没有答案,但看起来他们在 2010 年 11 月 19 日星期五的平台更新中提到了这一点:

http://developers.facebook.com/blog/post/430/

能够更改开放图谱类型

根据开发者的反馈,
我们现在允许站点更改开放图谱对象类型 (og:type),直到
他们收到 10,000 个赞。这不会重置类似计数。我们
鼓励开发者利用这个机会添加或更正他们的开放
图形对象类型,以便它们能够准确地表示在
未来。

但从时间顺序来看,您的帖子是在这次更改之后发布的,所以也许这只是暂时的。

I don't have an answer to this, but it looks like they mention this in their platform update on Friday, November 19, 2010:

http://developers.facebook.com/blog/post/430/

Ability to change Open Graph types

Based on feedback from developers,
we now allow sites to change Open Graph objects types (og:type) until
they receive 10,000 likes. This will not reset like counts. We
encourage developers use this opportunity to add or correct their Open
Graph object types so they will be accurately represented in the
future.

But looking at the chronology, your post was after this change, so perhaps it was only temporary.

飘然心甜 2024-10-26 19:43:13

另外,请提供 og:site_name 以及您的网站名称,因为这也是必需的。

Also provide og:site_name with your site name, as it is also required.

浅唱々樱花落 2024-10-26 19:43:13

我并不肯定,但您可能需要“迁移”您的“赞”按钮。

请参阅开发者页面。

...其中有这句话:

对于现有的“赞”按钮,迁移时将保留之前的计数。除了上一节中概述的某些功能之外,迁移不会影响“赞”计数和“赞”按钮的预期功能。

我自己仍然不太了解整个迁移过程,但它可能会对您有所帮助。

I'm not positive, but you may need to "Migrate" your Like Button.

See this developer page.

...which has this quote:

For existing Like Buttons, previous counts will be maintained with the migration. The migration will not affect Like counts and the expected functionality of the Like Button except certain features as outlined in the previous section.

I still don't quite understand the whole migration yet, myself, but it may help you.

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