微信公众号跳转小程序流程简单梳理(未完待续)

功能需求:公众号跳转至小程序

微信公众号跳转小程序流程简单梳理(未完待续)_第1张图片

一.准备工作

1.申请测试号

http://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index.

2.服务器配置

https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html.

注意:
1.80或443端口可以通过反向代理到服务器端口
2.url不能出现端口号
3.验证端口,若确认此次GET请求来自微信服务器,请原样返回echostr参数内容,则接入生效,成为开发者成功,否则接入失败。

一.所需对接接口

1.获取access_token

链接: https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_access_token.html.

2.生成带参数的二维码得到ticket

链接: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html.

3.通过ticket换取二维码

https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html.

4.接收事件推送(通过用户扫码关注等事件推送服务器得到openId)

https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html.

5.客服消息-发送小程序卡片(需要关联小程序)

https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html.

你可能感兴趣的:(微信公众号和小程序,小程序,java)