我正在尝试获取用户的公开照片(朋友的朋友)。当我浏览Facebook时,我看到它们,但我无法通过API访问它们。
SELECT created, link, caption, images, like_info FROM photo WHERE owner IN (SELECT uid FROM user WHERE username = "...") OR object_id IN (SELECT uid FROM user WHERE username = "kaja.szuminska") OR object_id IN (SELECT object_id FROM photo_tag WHERE subject IN (SELECT uid FROM user WHERE username = "...")) ORDER BY like_info DESC LIMIT 0, 100
,也不
.../albums
,也不
.../photos
,也不
.../photos/uploaded
作品。
有什么想法吗?
答案 0 :(得分:1)
要访问照片(公共或非公开),您需要获得许可。因此,只能访问您的照片(使用user_photos
权限)或朋友的照片(使用friends_photos
权限)。
如果要抓取公开照片,只能通过查看用户的公共Feed来执行此操作。即对https://graph.facebook.com/{user_id}/feed
进行API调用,然后过滤条目以查看是否发布了任何照片。