从 java 代码中使用 fql 返回的 start_time 值不同于从图形资源管理器返回的值。
fql:
fql?q={"events":"SELECT eid, name,description, start_time, end_time, pic_small,pic_big, eid,venue,location from event WHERE eid in (SELECT eid FROM event_member WHERE uid = me() and start_time > 1347482366)" ,"locations":"select page_id,location from page where page_id IN (select venue.id from #events)" ,"rsvpStatus":"select eid, rsvp_status from event_member where eid IN (select eid from #events) AND uid = me()"}
java代码结果:
{
"data": [
{
"name": "events",
"fql_result_set": [
{
"eid": 495493753795633,
"name": "Yo yo party",
"description": "",
"start_time": **1347656400**,
"end_time": **1347670800**,
"pic_small": "http:\/\/profile.ak.fbcdn.net\/static-ak\/rsrc.php\/v2\/yy\/r\/XcB-JGXohjk.png",
"pic_big": "http:\/\/profile.ak.fbcdn.net\/static-ak\/rsrc.php\/v2\/yn\/r\/5uwzdFmIMKQ.png",
"venue": {
"id": 154409375600
},
"location": "PIKE PLACE FISH MARKET"
}
]
},
{
"name": "locations",
"fql_result_set": [
{
"page_id": 154409375600,
"location": {
"street": "86 Pike Place",
"city": "Seattle",
"state": "WA",
"country": "United States",
"zip": "98101",
"latitude": 47.608639747653,
"longitude": -122.3405485174
}
}
]
},
{
"name": "rsvpStatus",
"fql_result_set": [
{
"eid": 495493753795633,
"rsvp_status": "attending"
}
]
}
]
}
图浏览器结果:
{
"data": [
{
"name": "events",
"fql_result_set": [
{
"eid": 495493753795633,
"name": "Yo yo party",
"description": "",
"start_time": "**2012-09-14T14:00:00-0700**",
"end_time": "**2012-09-14T18:00:00-0700**",
"pic_small": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yy/r/XcB-JGXohjk.png",
"pic_big": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yn/r/5uwzdFmIMKQ.png",
"venue": {
"id": 154409375600
},
"location": "PIKE PLACE FISH MARKET"
}
]
},
{
"name": "locations",
"fql_result_set": [
{
"page_id": 154409375600,
"location": {
"street": "86 Pike Place",
"city": "Seattle",
"state": "WA",
"country": "United States",
"zip": "98101",
"latitude": 47.608639747653,
"longitude": -122.3405485174
}
}
]
},
{
"name": "rsvpStatus",
"fql_result_set": [
{
"eid": 495493753795633,
"rsvp_status": "attending"
}
]
}
]
}
以下是问题:
- 时间格式差异
- 返回给java代码的start_time和end_time不正确。当我转换 unix 时间戳时,结果比实际事件开始和结束时间少一小时。
这是一个已知的问题?任何信息将不胜感激。