Twitter API 为我的帐户获取 webhooks [PHP]
Twitter API get webhooks for my account [PHP]
你知道当我的推特帐户 API 上有 activity 时是否可以设置 webhooks 吗?
例如:
- 当我的推文收到点赞时的通知
- 当我的帐户收到新订阅者时的通知。
等等...
谢谢。
是的。创建 webhook 并使用自己的帐户订阅 webhook 后,您将收到关注和回复事件。根据 Account Activity API documentation,我突出显示了两个相关的要点:
You will receive all related activities below for each user subscription on your webhook registration:
- Activity types Tweets (by user)
- Tweet deletes (by user) @mentions (of
user)
- Replies (to or from user)
- Retweets (by user or of user)
- Quote Tweets (by user or of user)
- Retweets of Quoted Tweets (by user or of
user)
- Likes (by user or of user)
- Follows (by user or of user)
- Unfollows (by user)
- Blocks (by user)
- Unblocks (by user)
- Mutes (by user)
- Unmutes (by user)
- Direct Messages sent (by user)
- Direct Messages received (by user)
- Typing indicators (to user)
- Read receipts (to user)
- Subscription revokes (by user)
请注意,您必须使用 API 将您自己的帐户手动订阅到您自己注册的 webhook - 这不会自动发生。您还需要处理每个接收到的 API 事件(webhook 将接收所有类型的事件)。
你知道当我的推特帐户 API 上有 activity 时是否可以设置 webhooks 吗?
例如:
- 当我的推文收到点赞时的通知
- 当我的帐户收到新订阅者时的通知。
等等...
谢谢。
是的。创建 webhook 并使用自己的帐户订阅 webhook 后,您将收到关注和回复事件。根据 Account Activity API documentation,我突出显示了两个相关的要点:
You will receive all related activities below for each user subscription on your webhook registration:
- Activity types Tweets (by user)
- Tweet deletes (by user) @mentions (of user)
- Replies (to or from user)
- Retweets (by user or of user)
- Quote Tweets (by user or of user)
- Retweets of Quoted Tweets (by user or of user)
- Likes (by user or of user)
- Follows (by user or of user)
- Unfollows (by user)
- Blocks (by user)
- Unblocks (by user)
- Mutes (by user)
- Unmutes (by user)
- Direct Messages sent (by user)
- Direct Messages received (by user)
- Typing indicators (to user)
- Read receipts (to user)
- Subscription revokes (by user)
请注意,您必须使用 API 将您自己的帐户手动订阅到您自己注册的 webhook - 这不会自动发生。您还需要处理每个接收到的 API 事件(webhook 将接收所有类型的事件)。