Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook OpenGraph DateTime attribute with only date being parsed as DateTime

I'm having issues with Facebook OpenGraph and a DateTime attribute that I'm setting on my page.

The tag looks like this:

<meta content="2013-06-10" property="app:departing_on" />

The tag is properly set as DateTime on the OpenGraph type. I'm using it to create a new Story. When I simulate a post, it changes the timezone to match mine (UTC-3), so I get June 09th, 2013 at 9:00PM. It is a date only event and so I don't actually have a time to display, just a date.

Can I force Facebook to parse it as a date?

like image 216
Pedro Nascimento Avatar asked Jun 03 '13 22:06

Pedro Nascimento


2 Answers

Can I force Facebook to parse it as a date?

That’s what its seems to be doing right now, but it does not seem to be what you want.

I think what Facebook docs call the Precise-time format might be what you should rather use:

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.

Which formats you can use to specify the OG DateTime type you can see here, https://developers.facebook.com/docs/opengraph/property-types/#simple

like image 68
CBroe Avatar answered Nov 15 '22 04:11

CBroe


Can I force Facebook to parse it as a date?

No. Facebook does not support at Date property, only a DateTime property. While it is optional for you to specify the time portion of a DateTime, the property nevertheless includes a time component and is recorded as such. Facebook wants things to happen at a specific moment in time, not a range like a date.

like image 37
Old Pro Avatar answered Nov 15 '22 06:11

Old Pro