FQL获取最后50张照片查询返回错误 [英] FQL get last 50 photos query returns error

查看:114
本文介绍了FQL获取最后50张照片查询返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何获得所有朋友上传的最近50张照片?

How can i get the last 50 photos uploaded by all my friends ?

我尝试在FQL中运行此查询:

I try to run this query in FQL:

SELECT pid, src 
FROM photo 
WHERE 
owner IN (SELECT uid1 FROM friend WHERE uid2=me())
OR pid IN (
     SELECT pid FROM photo_tag 
     WHERE subject in (SELECT uid1 FROM friend WHERE uid2=me())
) 
ORDER BY created DESC
LIMIT 50 OFFSET 0

我需要从我所有的朋友或我的朋友标记的最后50张照片in ...

I need to get last 50 photos from all my friends or that my friends where tagged in...

当我在API资源管理器中运行时,我收到一个错误:

when i run it in the API Explorer i get an error:

{
  "error": "Request failed"
}



I know i have sufficen permission becus when i run these 2 query i get results:

SELECT pid, src FROM photo WHERE owner =(me())

SELECT uid1 FROM friend WHERE uid2=me()

编辑:
我也试过这个..

I have also tried this ..

SELECT pid, caption, aid, owner, link, src_big, src_small, created, modified FROM photo 
WHERE owner IN  ( SELECT uid1 FROM friend WHERE uid2=me() )
and created >= 1377800559 
ORDER BY created DESC LIMIT 100

如何获取更多信息?
是不可能运行这样的查询?

how can i get more information ? is it not possible to run such a query ?

推荐答案

Finnaly!最后发布所有朋友的照片...

Finnaly !!! Last Posted Photos from all friends...

SELECT pid, src, src_small, src_big, target_id, created, backdated_time 
FROM photo where pid in (
    SELECT attachment.media.photo.pid
    FROM stream 
    WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid=me()) AND type = 247
)

你可以看到我的初始方法是错误的...
它实际上需要使用表来获取最新的帖子..
那么它可以被过滤,只能发布照片并使用他们的 pid 获取所需的所有信息! YAY!

as you can see my initial approach was all wrong ... it is actually required to use the stream table to get the latest posts.. then it could be filtered to get only photos posted and use their pid to get all the required info !!! YAY!

我希望它有助于其他遇到同样的问题。

I hope it helps other that encounter the same issue..

这篇关于FQL获取最后50张照片查询返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆