微博开放平台
微连接
移动应用
网站接入
电商服务商
电商商家
数据服务
数据服务
合作伙伴
微博支付
轻应用
粉丝服务
文档
推广
我的应用
登录
weibo
开发文档
首页
平台政策与指引
概述
平台公约
新手指南
开发者协议
应用运营管理规范
微连接分级管理办法
应用审核产品指南
应用安全开发注意事项
平台应用设计规范
微服务接入指南
微博登录接入
用微博帐号登录
授权机制
移动应用接入
移动应用介绍
移动应用SSO授权
微博Deep Link
媒体接入平台
头条文章开放接口
视频上传开放接口
电商接入平台
电商服务商接入
电商商家端接入
电商平台能力接口
粉丝服务平台
粉丝服务平台
新手接入指南
微信开发者迁移指南
接收消息
发送消息
自定义菜单
用户管理
生成带参数的二维码
Fans Service Platform
商业接口
商业数据接入指南
订阅服务手册(中文版)
订阅服务手册(英文版)
商业接口-REST API
商业数据常见问题
网站接入
网站接入介绍
微博API
微博API
接口访问频次权限
资源下载
SDK
微博标识下载
常见问题
联系我们
工具箱
链入页面
链出更改
特殊页面
查看源代码
跳转到:
导航
,
搜索
根据下列原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
After users following or unfollowing to your weibo account,or @ your weibo account, the Weibo server will push this events to the url which the third Weibo account wrote in the fan service platform. It gives great convenience to developers to send users with welcome messages or unbundling account. For each POST request from Weibo, developer can respond it by return specific JSON in response body. Weibo Server will disconnect and request your callback url again if can't receive any response in 5 seconds. Weibo Server will retry 3 times in total. About eliminating the repetitive messages which may result from the retry mechanism, we recommend you eliminating the repetitive message by using sender_id plus created_at. If developer can't respond in 5 seconds, developer can reply with blank string. Weibo Server will not do anything with your blank string and will not retry after receiving your blank string. ==Following or Unfollowing event== Following or unfollowing event,push the JSON format is as follows: <pre> { "type": "event", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "关注事件消息", "data": { "subtype": "follow" } } </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"|Parameters |style="text-align:center;width: 12%"|Type |style="text-align:center;"|Description |- |type |string |event |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |The default copy。subtype is follow or unfollow:“Taking attention event”、“anceling attention event”; |- |data |string |Message Content |- |data:subtype |string |follow:Taking attention ,unfollow:canceling attention event |- |} == Subscribe or unsubscribe event== Subscribe or unsubscribe event,Push the JSON format is as follows: <pre> { "type": "event", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "订阅事件消息", "data": { "subtype": "subscribe" } } </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"| Parameters |style="text-align:center;width: 12%"| Type |style="text-align:center;"|Description |- |type |string |event |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |The default copy。为subscribe或unsubscribe时为触发订阅的私信关键词(如“dy”),非私信触发时(点击订阅按钮)为“订阅事件消息”、“取消订阅事件消息”; |- |data |string |Message Content |- |data:subtype |string |subscribe:Subscribe event,unsubscribe:Unsubscribe event。 |- |} ==Scanning a two-dimension code with parameters== Two-dimensional code scanning parameters event,push the JSON format is as follows: <pre> { "type": "event", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "扫描二维码", "data": { "subtype": "scan_follow", "key": "action_name_scene_id", "ticket": "TICKET", } } </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"| Parameters |style="text-align:center;width: 12%"|Type |style="text-align:center;"| Description |- |type |string |event |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |The default copy.subtype as "two-dimensional code scanning" when scan or scan_follow; |- |data |string |Message Content |- |data:subtype |string |scan and scan_follow for the two-dimensional code scanning event。 |- |data:key |string |Event KEY values, format action_name_scene_id, ie to action_name prefixed behind two-dimensional code for scene_id; |- |data:ticket |string |Ticket-dimensional codes, two-dimensional code can be used to exchange pictures。 |} ==Have been @ message== Explanation: The specified user must be granted certification to receive "is @ message" permission, this interface will return to "be @ message", apply to e-mail [mailto:mingjin@staff.sina.com.cn mingjin@staff.sina.com.cn] 。 <pre> { "type": "mention", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "被@的微博或评论文本信息", "data": { "subtype": "MENTION_TYPE, "key": "MENTION_KEY" } } // The default return only trusted users @ @ For returns all users, authenticated users can access this link set:http://account.weibo.com/set/message </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"|Parameters |style="text-align:center;width: 12%"|Type |style="text-align:center;"|Description |- |type |string |mention |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |Text message or comment microblogging is @ |- |data |string |Message Content |- |data:subtype |string |status:@ Microblogging,comment:@ Comment |- |data:key |string |When subtype for status as a microblogging ID, ID when comment for review |} ==Pushing event when click menu to get messages== Click menu event,push the JSON format is as follows:: <pre> { "type": "event", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "自定义菜单点击事件消息", "data": { "subtype": "click", "key": "EVENT_KEY" } } </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"|Parameters |style="text-align:center;width: 12%"|Type |style="text-align:center;"| Description |- |type |string |event |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |The default copy,subtype when click "Custom menu click event message"; |- |data |string |Message Content |- |data:subtype |string |click, Custom menu click event |- |data:key |string |value is clicked custom menus |- |} ==Pushing event when click jump url== Pushing event when click jump url,push the JSON format is as follows: <pre> { "type": "event", "receiver_id": 1902538057, "sender_id": 2489518277, "created_at": "Mon Jul 16 18:09:20 +0800 2012", "text": "自定义菜单跳转链接事件消息", "data": { "subtype": "view", "key": "url" } } </pre> <div class="wiki_kit"> {|width="100%" border="0" cellspacing="0" cellpadding="0" class="wiki_table" <html><colgroup><col class="tbF1"/><col class="tbF2" /><col /></colgroup></html> !colspan="3" scope="col" |<span id="返回值说明">Return Value</span> |- |style="text-align:center; width: 12%"| Parameters |style="text-align:center;width: 12%"| Type |style="text-align:center;"|Description |- |type |string |event |- |receiver_id |int64 |Recipient of the message |- |sender_id |int64 |Sender of the message |- |created_at |string |Message creation time |- |text |string |The default copy,subtype when view is "custom menu hoplinks event messages"; |- |data |string |Message Content |- |data:subtype |string |view, Custom menu hoplinks event messages |- |data:key |string |Url the button settings |- |}
返回到
Receive Event Push
。
反馈
分享
顶部