FQL查询错误从粉丝页面获取事件

时间:2011-09-09 05:57:37

标签: facebook events facebook-fql

我正在尝试获取粉丝页面创建的所有活动。我使用了下面的查询。

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)

好的,这很好用,但我在FQL文档中看到,如果我没有在表start_time中指定event_member,它将只返回未来事件,但我需要粉丝页面创建的所有事件,包括事件过去的时间。

我尝试使用此查询:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = 142258389139112 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

但它会返回此错误:

  

“error_code”:604,     “error_msg”:“无法通过'eid'和'start_time'查询”,

当我尝试使用我的uid时,通常会查询该函数:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = me() 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

1 个答案:

答案 0 :(得分:2)

您的语法错误很少,请参阅下面的工作查询。

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event
WHERE creator = 142258389139112 
AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)
AND start_time > 1316649600
ORDER BY start_time

我希望这会有所帮助。