我在使用 Facebook OpenGraph
和我在页面上设置的 DateTime
属性时遇到问题。
标签看起来像这样:
<meta content="2013-06-10" property="app:departing_on" />
标签在 OpenGraph
类型上正确设置为 DateTime
。我正在用它来创建一个新故事。当我模拟一个帖子时,它会更改时区以匹配我的时区 (UTC-3),所以我得到 2013 年 6 月 9 日晚上 9 点。这是一个仅限日期的事件,所以我实际上没有时间显示,只有一个日期。
我可以强制 Facebook 将其解析为日期吗?
最佳答案
Can I force Facebook to parse it as a date?
这就是它现在似乎正在做的事情,但它似乎并不是您想要的。
我在想什么Facebook docs call the Precise-time format可能是您应该使用的:
Precise-time (e.g., '2012-07-04T19:00:00-0700'): events that start at a particular point in time, in a specific offset from UTC. This is the way new Facebook events keep track of time, and allows users to view events in different timezones.
您可以使用哪些格式来指定 OG DateTime 类型,您可以在此处看到,https://developers.facebook.com/docs/opengraph/property-types/#simple
关于Facebook OpenGraph DateTime 属性,只有日期被解析为 DateTime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16906561/