我正在尝试查找使用 Facebook PHP SDK 标记当前用户的所有照片。当我查询 $fb->get('/me/photos?type=tagged&limit=10000')
时,当我以我的身份登录时,列表中只有大约 500 张照片。如果我查看 Facebook 网页,它说有超过 3000 张我的照片。是否可以获取当前用户的所有照片?
最佳答案
希望这个总结可以节省一些人的时间,因为我花了几天时间挠头解决这个问题。从 Graph API v2.5 开始,您的应用将无权查看其他人上传的照片,除非上传者已登录该应用并授予 user_photos
权限。这甚至适用于标记了当前用户的照片。
为了让某个应用能够通过 Graph API 获取标记了您的所有照片,您所有上传了标记有您的照片的 friend 都必须向该应用授予权限。
引用 Facebook 支持:
After checking, this should be the case. Each Facebook user is in control of what data is accessible to an application. If you have that user grant the user_photos (and possibly user_posts if it's the container for the photo) to the application, you should be able to fetch that photo.
关于php - 如何在 Facebook Graph PHP SDK 中下载当前用户的所有照片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33296364/