有没有办法只返回包含来自 FQL 流查询的照片的附件?
我正在尝试使用 FQL 获取我的应用程序已发布到用户流的所有照片。我意识到我可以通过首先执行以下查询来做到这一点:
SELECT attachment FROM stream WHERE source_id = me() AND app_id = <my_app_id>
然后在本地解析附件以确定其类型。但我想知道,有没有办法在我的查询中包含附件类型,以便只返回带有照片的附件?
I am trying to get all the photos that my app has posted to a user's stream using FQL. I realize I could do this by first performing the following query:
SELECT attachment FROM stream WHERE source_id = me() AND app_id = <my_app_id>
and then parsing the attachments locally to determine their type. But I'm wondering, is there any way to include the attachment type in my query so that only attachments with photos are returned?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Facebook 已更新流表以包含“类型”:
https://developers.facebook。 com/docs/reference/fql/stream/
所以我的问题的答案变成:
顺便说一句,他们似乎没有追溯更新流表,即旧帖子没有“类型”值
Facebook has updated the stream table to include "type":
https://developers.facebook.com/docs/reference/fql/stream/
So the answer to my question becomes:
By the way, it doesn't seem they retroactively updated the stream table i.e. old posts do not have a "type" value
如果您尚未为发布到用户帐户的照片选择/创建特定相册,则所有照片都将位于同一个相册中 - 类似于
;照片
。摘自 Facebook 博客文章 489:
从那里您可以检索您的应用程序发布的所有照片帖子。我发现用户不太可能将照片上传到您应用的特定相册中(尽管有可能)。
此外,将 photo_id/album_id 保存在您的自己的数据库中以供将来使用是一个好主意。
if you have not selected/created a specific album for photos being posted to a users account, all of them will be in the same album - something like
<app_name> Photos
.Taken from facebook blog post 489 :
From there you could retrieve all photo posts made by your app. I find it very unlikely that a user would upload a photo into your app's specific album (although its possible)
In addition, saving photo_id/album_id in your own database for use in the future is a great idea.