FB Open Graph 对象标识、对象 url 和应用程序域之间的关系?

发布于 2024-12-06 01:44:34 字数 1201 浏览 0 评论 0原文

我正在寻求有关 Facebook 如何唯一标识对象图中的对象的说明。具体来说,我们有数百个网站,其中显示酒店信息的页面存在显着重叠。我们希望为酒店提供“喜欢”按钮,但可以跨网站汇总计数 - 这样一来,一个人在哪个网站上“喜欢”特定酒店并不重要,它都会对相同的全球计数做出贡献。

更重要的是,开放图背后的理念是,它表示现实世界对象之间的关联 - 这些对象恰好由网页表示,因此有关特定酒店的页面在网页中引用相同的酒店页面对象是有意义的。图表,无论它是从哪个网站“喜欢”的。例如,对于书籍和产品,开放图谱协议 (OGP) 使用 ISBN 和 UPC 编号,但不存在此类通用代码对于其他类型。

具体来说,

  1. 如果我将酒店页面的开放图谱协议 (OSP) og:url 元属性设置为引用中心站点的 URL,这样所有页面的 og:url 都相同关于该酒店的信息,无论该信息出现在我们众多网站中的哪个网站上,都能达到所需的唯一性吗? (FB 是否会解释这一点,或者它被认为是不透明的?)
  2. 当我使用 FB 调试器/Lint 时应用程序检查我的页面时,它抱怨 fb:app_id 元标记中引用的应用程序 ID 不允许出现在 Facebook 上应用程序设置中设置的“基本”域之外的任何域中。假设这意味着我需要为我们使用的每个域创建一个单独的应用程序(!),这对酒店对象标识有什么影响吗? (或者酒店身份是否保持独立,并且通过使用任何 App ID 的 Graph API 调用“点赞”酒店将导致与其 og:url 中标识的单个酒店对象正确关联?)。我什至需要页面上的应用程序 ID 吗? (也许只是管理员?)
  3. 如果当人们在 Facebook 网站上搜索时 Facebook 返回任何酒店,它会为结果提供哪个 URL/链接? (og:url?)
  4. 最后,稍微有点过分的是,我想知道如果特定规范 og:url 对象的 og: 元数据在不同站点上具有不同的属性,会发生什么情况,Facebook 会如何处理它(例如,如果og:site_name 在每个域上都是不同的,其中同一家酒店由相同的 og:url 表示)

我仍在努力理解这一切,所以我很欣赏所有那些 Facebook 忍者:) 抱歉,如果我已经放太多细节。

干杯。

I'm looking for clarification on how Facebook uniquely identifies objects in the object graph. Specifically, we have several hundred sites for which there is significant overlap in pages that display hotel information. We'd like to have 'Like' buttons for hotels, but have the counts aggregate across sites - so that it doesn't matter on which site a person 'likes' a specific hotel, it'll contribute to the same global count.

More importantly, the philosophy behind Open Graph is that is represents associations between real-world objects - which just happen to be represented by a web-page, so it makes sense for page about a particular hotel to reference the same hotel page object in the graph, regardless of which site it was 'liked' from. For example, for books and products the Open Graph Protocol (OGP) uses ISBN and UPC numbers, while no such universal code exists for other types.

Specifically,

  1. If I set the Open Graph Protocol (OSP) og:url meta property of a hotel page to a URL that references a central site - so that it will be the same og:url for all pages about that hotel regardless of which of our many sites the information appears on, will that achieve the uniqueness required? (does FB even interpret that or is it considered opaque?)
  2. When I use the FB Debugger/Lint app to check my page, it complains that the App ID referenced in the fb:app_id meta tag isn't allowed on any domain other that the 'base' domain set in the App's settings on Facebook. Assuming that this implies I need to create a separate app for every domain we use(!), is there any implication of that for the hotel object identity? (or will the hotel identity remain independent and 'Like'ing a hotel via a Graph API call with any App ID will result in the correct association with the single hotel object as identified in its og:url?). Do I even need an App ID on the page? (just admins perhaps?)
  3. If Facebook returns any of the hotels when people search on the Facebook site, which URL/link will it offer for the result? (the og:url?)
  4. Lastly, and slightly OT, I'm wondering what happens if the og: metadata for a particular canonical og:url object has different properties on different sites, what Facebook will make of it (- e.g. if the og:site_name was different on each domain where the same hotel was represented by the same og:url)

I'm still trying to get my head around it all, so I appreciate all those Facebook ninjas out there :) Apologies if I've put too much detail.

Cheers.

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

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

发布评论

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

评论(1

顾挽 2024-12-13 01:44:34

为了部分回答 1,Facebook 表示“如果用户使用 Like 按钮喜欢您的 URL,则动态消息故事 [...] 将发布到 Facebook。 og:title 链接到 og:url,并且 og:site_name 被渲染自动指向您网站的域。”

伤心。虽然 og:url 旨在唯一标识现实世界的对象,但 Facebook 显然认为所有用户都希望有一个指向有关该对象的单个网页的链接,无论是否存在多个网页以及来自哪个页面。他们点击“赞”的对象。因此,即使用户通过“coolhotelinfo.con/abchotel”或“discounthotels.con/abchotel”等页面“喜欢”酒店,他们也会在其提要中获得一个指向“boringhotelreferencedata.con/abchotel”的链接(例如)。

To partially answer 1, Facebook says "If a user likes your URL using a Like button, a News Feed story [...] will be published to Facebook. The og:title links to og:url and the og:site_name is rendered pointing to your site's domain automatically."

Sad. While the og:url is intended to uniquely identify a real-world object, Facebook apparently thinks all users would like to have a link to only a single web-page about the object, regardless of the existence of many and from which page about the object they hit 'Like'. So, even if a user 'Likes' a hotel from a page like coolhotelinfo.con/abchotel or discounthotels.con/abchotel they'll get a link on their feed to boringhotelreferencedata.con/abchotel (for example).

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