5

这是我第一次无法自己找到错误的解决方案。我尝试执行 fql 查询,但我得到一个非常奇怪的响应:/

问题解答:

{
  "477215715631180":
      "SELECT name, start_time, location, creator, pic_square 
       FROM event WHERE eid=477215715631180",
  "creator_477215715631180":
      "SELECT name FROM profile WHERE id IN (SELECT creator FROM #477215715631180)"
 }

回复:

(#601) Parser error: unexpected '#' at position 58.

位置 58:

... FROM event WHERE ...

API 资源管理器。

有没有人有解决方案?

4

1 回答 1

4

问题似乎是您不能将子查询命名为与保留的 FQL 项目相同的名称。您在此处使用 id 作为查询指示符。Facebook 不喜欢这样。

我可以通过在子查询名称的开头添加“q”来运行您的查询:

{
  "q477215715631180":
      "SELECT name, start_time, location, creator, pic_square 
       FROM event WHERE eid=477215715631180",
  "creator_477215715631180":
      "SELECT name FROM profile WHERE id IN (SELECT creator FROM #q477215715631180)"
}

For your parser error, Facebook's messages don't reference the whole FQL multiquery. Facebook parses each query individually and throws an error just for the current query it's parsing. So in your case, the first query parsed fine, then this error came from your creator_ query, where the # occurs at position 58.

于 2012-08-20T11:47:53.037 回答