Facebook OpenGraph DateTime 属性,只有日期被解析为 DateTime

标签 facebook facebook-opengraph

我在使用 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/

相关文章:

javascript - 在用户时间线上发布操作时出现问题

javascript - Google+ 参数无法正常工作

ruby-on-rails - 在 Rails 应用程序中放置 Facebook 元标记

专门用于汽车的 rdfa 命名空间

cURL 无法解析主机,但 Web 浏览器可以访问它

html - 使用开放图在 Facebook 上共享音频

Facebook 页面 (/me/accounts) access_token 过期?

ios - Facebook 使用 Firebase 和 LoginButton 登录 IOS

asp.net - 在 ASP.NET : Session, Cookie 或身份中存储 Facebook 信息?

php - 使用 Facebook 和/或电子邮件双重登录网站