为什么此 FQL 不返回某些用户的个人资料图片?
这个 FQL 来自一个已经运行了几天的应用程序,并且已经过彻底测试:
SELECT src_big FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner = {uid} AND type = 'profile')
我使用的是从 ActionScript 桥接的 JS API,并且 {uid}
部分被替换为任何 uid对应于朋友浏览器中单击的列表项。问题是,大多数时候这个查询工作得很好,返回大图像(尽管通常不是一组完整的匹配个人资料图像),但在某些情况下,查询根本不返回任何内容,只是一个空数组。检查用户的个人资料图像相册确认有大量图像可供选择。有人知道为什么会这样吗?
This FQL is from an app which has been running for a few days now, and has been thoroughly tested:
SELECT src_big FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner = {uid} AND type = 'profile')
I'm using the JS API bridged from ActionScript and the {uid}
part is replaced with whatever uid corresponds to a list item clicked in a friend browser. The thing is that most of the time this query works fine and nice, large images are returned (although usually not a complete set of matching profile images), but in some instances the query does not return anything at all, just an empty array. Checking the user's profile images album confirms that there are plenty of images to choose from. Anyone know why that might be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是因为该用户设置了隐私设置,因此您无法访问他们的个人资料图片。
Probably because that user has their privacy settings set so you cannot access their profile picture.
这是因为,如果您导航到 ,某些字段对公众可见,而其他字段则需要权限。
users.getInfo
方法,按照 < 的建议代码>用户表。您将找到可以查询任何用户的公共字段列表:现在查询
相册
如果用户未授予您权限,表很可能不会返回任何内容,但值得尝试以下操作:如果它不起作用,那么您可能需要坚持使用上面列表中的
pic_square
。另外值得注意的是,所有
pic
字段可能为空:这适用于
user
表中提到的所有图片。重要提示:
在没有返回图像时使用后备图像(通用图像)始终是一个好习惯!
That's because some fields are visible to public and others need permissions, if you navigate to the
users.getInfo
method as advised from theuser
table. You'll find the list of public fields that you can query for any user:Now query the
album
table would most likely return nothing if the user didn't grant you permissions, but it's worth to try the following:If it didn't work then you may need to stick with
pic_square
from the list above.Also it's worth to note that all the
pic
fields might be empty:This applies to all the pics as mentioned in the
user
table.IMPORTANT NOTE:
It's always a good practice to have a fallback image (a generic image) to use whenever no image is returned!