View Code? Open in Web Editor
NEW
This project forked from yyblove/wechat-open
微信第三方平台开发
wechat-open's Introduction
微信第三方平台 - 申请资料说明
- 第三方平台先提供一个
HMTL
页面,介绍该平台的功能,并提供授权页面
- 用户点击授权地址,获得一个
二维码
页面
- 公众号
管理者
或运营者
,扫描这个二维码
,同意授权
- 第三方平台服务获取相关信息,并进行处理
- 至此公众号授权给第三方平台完成
微信 - 授权流程技术说明
- URL:
http://open.baidu.com/open/event/authorize
- 该URL处理4件事情,分别是
- 处理微信每10分钟像这个接口推送的
component_verify_ticket
- 处理取消授权通知
- 处理授权成功通知
- 处理授权更新通知
- 接收到消息后接收到后必须直接返回字符串
success
component_verify_ticket
: 验证平台方的重要凭据,服务方在获取component_access_token时需要提供最新推送的ticket以供验证身份合法性。此ticket作为验证服务方的重要凭据,请妥善保存。
- URL:
http://open.baidu.com/open/$APPID$/callback
- 该URL处理,粉丝对公众号的发送消息、菜单、扫码等事件。
- 并且要处理微信全网发布检测, 微信 - 全网发布接入检测说明
- URL:
http://open.baidu.com/open
- 该页面需要提供一个授权链接:
https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=xxxx&pre_auth_code=xxxxx&redirect_uri=xxxx
component_appid
: 第三方平台的APPID
pre_auth_code
: 预授权码
redirect_uri
: 回调URI,不需要URLEncode
- 提供授权页面
- URL:
http://open.baidu.com/open/auth
- 返回授权成功页面