dongzi9196 2012-03-04 03:29
浏览 9
已采纳

完全限制没有在FQL中显示?

I am trying to read a user's news feed and display the 10 latest pictures. Here's how I am currently doing it using Facebook FQL:

SELECT post_id, actor_id, tagged_ids, message FROM stream WHERE type=247 AND filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND type="newsfeed") LIMIT 0,10

However, it only shows about 4 results when I tell is to show 10. When I take out the WHERE clause with type, then it displays the correct number but they aren't images.

I've read about paging and stuff, but I want to display the latest 10. I can't just guess on a date and display how ever many pictures where placed at that. For some users, it might come out to be just a few and some might be over 100 and that wouldn't be good!

Please help, Coulton

  • 写回答

1条回答 默认 最新

  • dongwei9365 2012-03-04 12:58
    关注

    I'am experiencing the same problem but have not found a satifactioning resolution.

    But i can tell you why this is happening. Facebook describes it in this blog post. http://developers.facebook.com/blog/post/478/

    Long story short: You request 10 results, facebook filters 6 results that are not visible for the user and returns you the 4 results that are visible.

    This means you have to do a smart check in your code. You have to check if you got 10 results back. If not request another 10 results, check if you have a total of ten results. If not request another 10 and so on..

    If you stumbled upon a better resolution please contribute, i would love to know.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥15 Oracle触发器记录修改前后的字段值
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题