是否可以通过指定其名称来获取特定相册中的用户照片?我试图只获得名为“移动上传”的专辑。
offset = 0
mobile = "mobile uploads"
mobileUploads = "SELECT src_big FROM photo WHERE album_object_id IN (SELECT aid FROM album WHERE name=" + mobile + ") ORDER BY created DESC LIMIT " + offset + ",16"
$.getJSON "https://graph.facebook.com/fql?q=" + mobileUploads.replace(/\s+/g, "+") + "&access_token=" + FB.getAccessToken(), (data) ->
答案 0 :(得分:1)
是的,但是你的FQL中有一些错误。试试这个:
SELECT src_big FROM photo WHERE album_object_id IN
(SELECT object_id FROM album WHERE owner = me() AND name="mobile uploads")
ORDER BY created DESC
aid
!= album_object_id
owner
才能使子查询可转换。type = 'mobile'
,以防用户重命名其“移动上传”相册或拥有多个相册。