如何将Facebook Graph API日期转换为UNIX时间戳?
发布于 2012-05-03 00:30:47
我不知道日期格式,但我怀疑它是通用和/或标准格式,所以strtotime()应该可以很好地工作。
$timestamp = strtotime('2012-04-24T22:01:00+0000');发布于 2013-06-08 02:19:49
Facebook最近添加了一个功能,其中日期/时间将以Unix时间戳格式返回,只需在图形调用的末尾添加date_format=U查询参数即可。例如:
https://graph.facebook.com/me/events?date_format=U&access_token=.....这将以Unix时间戳格式(如1309572000)返回时间/日期。
注意:到目前为止,只有时间戳格式的updated_time,而不是start_time
https://stackoverflow.com/questions/10417868
复制相似问题