开始使用 filtered stream webhooks API
- 使用 v2 filtered stream endpoint 时,你需要建立持久连接并监听符合你规则的 Post。
- 使用本 filtered stream webhook endpoint 时,你需要注册你的 webhook,X 会将符合你规则的 Post 投递到你的 webhook。
- 设置你的 filtered stream 规则
- 创建你的 webhook
- 将你的 Filtered Stream 实例关联到你的 webhook
设置你的过滤流规则
创建你的 webhook
将你的 Filtered Stream 实例链接到 webhook
POST /2/tweets/search/webhooks/:webhook_id
你可以包含与流式端点 /2/tweets/search/stream 相同的查询参数,例如 expansions、fields 和媒体选项。这样可以自定义事件负载中包含的 data。
示例: