Facebook多个fql查询

时间:2014-01-27 15:12:07

标签: facebook facebook-fql

我有这样的疑问

{
"users" : "SELECT uid, name, pic_big FROM user WHERE uid in (SELECT source_id FROM #stream)",
"stream" : "SELECT post_id, description, type, message, created_time, updated_time, source_id, attachment from stream where filter_key in ('others') and type in (46, 56, 66, 80, 128, 247, 308) and (message or description) ORDER BY created_time desc LIMIT 15",
"photos" :"select images, pid from photo where pid in (SELECT attachment.media.photo.pid FROM #stream)"

}

当我尝试使用graph explorer中的access_token时,一切顺利。但是如果我使用我的应用程序的访问令牌给用户带来了错误

{
  "error": {
    "message": "An unknown error has occurred.", 
    "type": "OAuthException", 
    "code": 1
  }
}

我发现,如果更改上一个查询并将此代码替换为真正的pid,则一切顺利。 SELECT attachment.media.photo.pid FROM #stream

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

随意我管理它实现了我想要的目标。

这里有工作代码:

{
"users" : "SELECT uid, name, pic_big FROM user WHERE uid in (SELECT source_id FROM #stream)",
"stream" : "SELECT post_id, description, type, message, created_time, updated_time, source_id, attachment from stream where filter_key in ('others') and type in (46, 56, 66, 80, 128, 247, 308) and (message or description) ORDER BY created_time desc LIMIT 15",
"photos" :"select images, pid from photo where pid in (SELECT attachment FROM #stream)"
}

如您所见,我将SELECT attachment.media.photo.pid FROM #stream更改为SELECT attachment FROM #stream

我现在根本没有看到FQL中的逻辑:(