FQL 查询导致 601 解析错误:意外的“_”
首先我要说的是,我的代码似乎适用于我测试过的所有用户(只有一个)。
我正在使用以下多重查询来获取用户的相册和封面图像数据:
{
"album_query": " SELECT aid, object_id, name, modified, size, link, cover_pid FROM album WHERE owner = me() ORDER BY modified DESC",
"cover_query": " SELECT pid, src_small, src_small_width, src_small_height FROM photo WHERE pid IN (SELECT cover_pid FROM #album_query)"
}
查询按预期工作。它返回的援助是 100002647632588_33813 和 100002647632588_19303。请注意,这是我见过的唯一一个辅助工具中带有“_”的实例。
我的猜测是这就是问题所在,但继续前进。
后来,我运行以下 FQL 查询来获取给定相册中最新的 9 张照片:
SELECT pid, object_id, src, src_width, src_height, src_big, src_big_width, src_big_height, modified FROM photo WHERE aid = 100002647632588_19303 ORDER BY modified DESC LIMIT 0, 9
我得到以下响应:
{ error_code: "601", error_msg: "解析器错误:位置 138 处出现意外的 '_19303'。", ...}
这看起来像是 facebook 端的一个错误,因为我使用的是他们提供的 id,但我希望多几双眼睛能帮我解决问题。
感谢您提供的所有帮助。
Let me preface this by saying that my code seems to work for all users I've tested with but one.
I'm using the following multiquery to get a user's albums and cover image data:
{
"album_query": " SELECT aid, object_id, name, modified, size, link, cover_pid FROM album WHERE owner = me() ORDER BY modified DESC",
"cover_query": " SELECT pid, src_small, src_small_width, src_small_height FROM photo WHERE pid IN (SELECT cover_pid FROM #album_query)"
}
The query works as expected. The aid's that it returns are 100002647632588_33813 and 100002647632588_19303. Note that this is the only instance I've seen where an aid has a '_' in it.
My guess is that this is where the problem is, but moving on.
Later I run the following FQL query to get the latest 9 photos in a given album:
SELECT pid, object_id, src, src_width, src_height, src_big, src_big_width, src_big_height, modified FROM photo WHERE aid = 100002647632588_19303 ORDER BY modified DESC LIMIT 0, 9
I get the following response:
{ error_code: "601", error_msg: "Parser error: unexpected '_19303' at position 138.", ...}
This looks like a bug on facebook's end since I'm using an id that they provided, but I'm hoping a few more sets of eyes will sort me out.
Thank you for any and all help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将“”放在援助周围 - “100002647632588_19303”或使用 %22 正确转义它,以便它读取为字符串而不是数字 -
像这样 -
或
You need to either put "" round the aid - "100002647632588_19303" or use %22 to escape it correctly so it reads as a string and not a number -
like this -
or