使用 Facebook(例如 API 和 opengraph)
facebook 的文档无法理解,至少对我来说是这样。
我以前从未使用过 Facebook,并且有一个基本要求,即在产品页面上放置一个“赞”按钮。
因此,昨天,我将 OpenGraph 元标记和点赞按钮添加到了我的产品页面,如本文档中所述,https ://developers.facebook.com/docs/opengraph/。我还创建了一个应用程序,正如文档所述,它扩展了基本元数据以添加必填字段以将您的网页与 Facebook 连接:fb:app_id。
已设置“喜欢”按钮,但我有几个查询,如下所示:-
对于某些页面,“喜欢”按钮不读取 og 标签。它不是通过阅读 og 标签以故事的方式发布整个内容,而是仅显示一个链接。在谷歌搜索过程中,我读到它是由于 Facebook 缓存而发生的,因为我在放置元标签之前在 Facebook 上共享了链接,所以这种情况正在发生。那么,有什么方法可以让 facebook 重置我的页面的所有缓存或之前完成的抓取。
虽然我已经创建了该应用程序,但我实际上不知道如何使用它。为什么需要它以及它可以帮助我做什么。
我在这里测试了我的一个网址:Facebook Linter 但它显示了一些错误和内容我无法理解。下面是图像。请告诉我是否做错了什么以及为什么显示这些错误
The Documentation from facebook isn't understandable, atleast for me.
I have never worked before with facebook and had a basic requirement of putting a like button on Product pages.
So yesterday, I added the OpenGraph meta tags and like button to my Product pages as stated in this documentation, https://developers.facebook.com/docs/opengraph/. I also created an app, as the document stated that it has extended the basic meta data to add a required field to connect your webpage with Facebook: fb:app_id.
The like button has been set but i have few queries which are as following :-
For some pages, the like button doesn't read the og tags. Rather than publishing the whole thing in a story manner by reading og tags, it just shows a link. During googling, I read it happens because of facebook caching and since, I shared the link on facebook before putting the meta-tags, this is happening. So, Is there any way that I can direct facebook to reset all the caching for my pages or scraping that it has done earlier.
Though I have created the App, I actually have no idea what to do with it. Why is it needed and what matters it can help me with.
I tested one of my URLs here: Facebook Linter but it shows some error and stuff which i can't understand. Below is the image. Please tell if I have done anything wrong and why it's showing these errors
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Facebook 上的 OpenGraph 文档包含有关预定义类型的过时信息,请参阅 OpenGraph 类型。您可能需要使用开放图谱设置中的开发人员应用程序为您的应用程序/站点定义自定义对象类型“产品”。
您可能还想阅读 OpenGraph beta 的文档。
更新:
关于这个
og:type
有一个类似的问题:Opengraph 元标记 og:type 设置为“产品”错误(如按钮和 URL linter/debug)Documentation for OpenGraph on Facebook containing outdated information about pre-defined types, see OpenGraph Types. You probably need to define your custom Object Type "Product" in for your Application/Site using Developer Application in Open Graph settings.
You may want to read Documentation for OpenGraph beta too.
Update:
There is a similar question about exactly this
og:type
: Opengraph meta tag og:type set to “product” errors (like button & URL linter/debug)