如何将 Facebook Graph API Date 转换为 UNIX 时间戳?
Facebook最近添加了一项功能,其中日期/时间将以Unix时间戳格式返回,只需将date_format=U
查询参数添加到Graph调用的末尾即可。例如:
https://graph.facebook.com/me/events?date_format=U&access_token=.....
这将返回 Unix 时间戳格式(例如 1309572000)的时间/日期。
注意:截至目前,只有时间戳格式的updated_time,而不是start_time
我不知道
日期格式,但我怀疑它是通用和/或标准格式strtotime()
所以应该可以正常工作。
$timestamp = strtotime('2012-04-24T22:01:00+0000');