如何以编程方式使用自定义 og:tags 属性定义 facebook open graph 对象
我有一个包含数千种产品的网站。我已将我的网站与 FB open graph 正确集成。每个产品 URL 现在都有各种 FB 图形属性,例如名称、图片、描述,这正是我想要的:
即。 http://graph.facebook.com/283414328378288
但是,我想定义其他自定义属性,例如“价格”、“短标题”、“短描述”。这些属性不是 FB 图形和元标记的标准属性。
我有数千种产品,所以理想情况下我想简单地添加一个 og 标签,例如:
<meta property="og:price" content="35">
<meta property="og:short_title" content="awesome_product">
然后添加后,facebook 会选择它并将其作为自定义属性添加到我的开放图对象中......但是我很确定它会赢不工作。因此,我的问题是:
有没有一种方法可以以编程方式向 FB 打开图形对象添加自定义属性,而无需通过 Facebook 用户界面? (http://developers.facebook.com/docs/opengraph/define-objects/ )显然,通过拥有数千个不断变化的产品......通过 FB 接口向对象添加自定义属性将是一个不切实际的解决方案。
I have a website with several thousands of products. I've integrated my site with FB open graph properly. each product URL now has various FB graph properties such as name, picture, description, which is exactly what I want:
ie. http://graph.facebook.com/283414328378288
HOWEVER, I want to define ADDITIONAL CUSTOM properties such as "price", "short_title", "short_description". These properties are NOT standard with the FB graph og meta tags.
I have thousands of products so ideally I want to simply add an og tag such as:
<meta property="og:price" content="35">
<meta property="og:short_title" content="awesome_product">
then after adding that, facebook would pick that up and add it to my open graph object as a custom property... however I am pretty sure that won't work. Therefore, my question is:
Is there a way to programmatically add custom properties to FB open graph objects WITHOUT going through the Facebook user interface? (http://developers.facebook.com/docs/opengraph/define-objects/) obviously by having thousands of changing products.. going through the FB interface would be an unrealistic solution to adding custom properties to objects.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

你不知道;没有 API 可以更新操作、对象等。您只需执行一次此操作,并且应用程序设置中有一个用于执行此操作的界面
You don't; there is no API to update actions, objects, etc. This is something you'll only need to do once, and there's an interface for doing so in the app settings