Facebook graph api-如何获取用户提要,而没有用户关于喜欢和评论的帖子?

Facebook graph api- how to get user feed,with out posts about likes and comment by the user?(Facebook graph api-如何获取用户提要,而没有用户关于喜欢和评论的帖子?)
本文介绍了Facebook graph api-如何获取用户提要,而没有用户关于喜欢和评论的帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在开发一个 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 通过查找 storystory_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-如何获取用户提要,而没有用户关于喜欢和评论的帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)