问题描述
我正在开发一个 fb 应用程序,我想在其中为用户提供时间线,但我需要排除诸如用户喜欢照片"、朋友照片上的评论"之类的故事.我如何过滤和排除这些类型的故事
i am developing a fb app,in which i want to give the users time line,but i need to exclude stories like "User likes a photo","coments on friends's photo".how i filter and exclude these types of stories
推荐答案
你可以过滤这些 Posts 通过查找 story 或 story_tags 键的存在,因为这些在用户发布的帖子中不存在.
You can filter these Posts by looking for the presence of the story or story_tags key as these is not present in the Posts made by the User.
引用文档中story的描述代码>键
非用户故意生成的故事文本,例如两个用户成为朋友时生成的故事;您必须在您的应用中启用包括最近的活动故事"迁移才能检索这些故事
Text of stories not intentionally generated by users, such as those generated when two users become friends; you must have the "Include recent activity stories" migration enabled in your app to retrieve these stories
或者你可以像这样尝试 FQL 的stream
Or you may try FQL's stream like this
select message from stream where source_id=me() and type in (46,56,80,56,128,247)
and filter_key in (select filter_key from stream_filter where uid=me())
这可能会帮助您将帖子减少到您想要的帖子.
which might help you to reduce the Posts to one that you desire.
更新
您可能不需要使用林果皞验证的 type 字段来减少结果,因此查询减少到
You might not require to reduce the result using type field as verified by 林果皞 , so the query reduces to
select message from stream where source_id=me() AND filter_key in
(select filter_key from stream_filter where uid=me())
这篇关于Facebook graph api-如何获取用户提要,而没有用户关于喜欢和评论的帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)