2013-01-21 73 views
0

我使用iPhone應用程序從不同渠道獲取事件並在地圖上顯示它們。 現在我嘗試抓住我的數據庫中的Facebook事件。 我提出這個請求如何使用Graph API從所有註冊用戶獲取所有事件?

SELECT name, venue, location, start_time, update_time FROM event WHERE update_time>1358294400 

但它不起作用。 Facebook返回

{ 
    "error": { 
    "message": "Error validating access token: Session has expired at unix time 1358528400. The current unix time is 1358761880.", 
    "type": "OAuthException", 
    "code": 190, 
    "error_subcode": 463 
    } 
} 

我如何通過update_time獲得活動?

在此先感謝。

回答

1

我想你不行。由於 -

WHERE子句必須包含可索引列。這些色譜柱在表中標有*

updated_time不是可索引列。只有eidname可在表event中索引。

所以,簡單地讓所有的數據,然後根據updated_time

+0

我怎麼能簡單地讓所有的數據手動篩選? –

+0

取決於你的要求。你可以使用這個 - 'SELECT name,venue,location,start_time,update_time FROM event WHERE eid in(select event from member where uid = $ id)' –

+0

但是我需要所有用戶的所有事件。 –

相關問題