Overview of WeChat public platform development


Overview of WeChat Public Platform Development


WeChat Public Platform is a platform for operators to provide information and services to WeChat users through public accounts, and the public platform development interface It is the basis for providing services. After developers create a public account on the public platform website and obtain the interface permissions, they can help development by reading this interface document.


In order to identify users, each user will generate a secure OpenID for each official account. If it is necessary to share users between multiple official accounts and mobile applications, then You need to go to the WeChat Open Platform and bind these official accounts and applications to an open platform account. After binding, although a user has multiple different OpenIDs for multiple official accounts and applications, he has access to the same open platform for all of them. The public accounts and applications under the account have only one UnionID. You can learn more in the User Management - Obtaining Basic User Information (UnionID Mechanism) document.

Please note to developers:


1、微信公众平台开发是指为微信公众号进行业务开发,为移动应用、PC端网站、公众号第三方平台(为各行各业公众号运营者提供服务)的开发,请前往微信开放平台接入。
2、在申请到认证公众号之前,你可以先通过测试号申请系统,快速申请一个接口测试号,立即开始接口测试开发。
3、在开发过程中,可以使用接口调试工具来在线调试某些接口。
4、每个接口都有每日接口调用频次限制,可以在公众平台官网-开发者中心处查看具体频次。
5、在开发出现问题时,可以通过接口调用的返回码,以及报警排查指引(在公众平台官网-开发者中心处可以设置接口报警),来发现和解决问题。
6、公众平台以access_token为接口调用凭据,来调用接口,所有接口的调用需要先获取access_token,access_token在2小时内有效,过期需要重新获取,但1天内获取次数有限,开发者需自行存储,详见获取接口调用凭据(access_token)文档。
7、公众平台接口调用仅支持80端口。


The official account is mainly through the public Account message sessions and official account webpages are used to provide services to users. The two situations are introduced below:


1. Official account message sessions

The public account exists in the form of a contact of the WeChat user, and the message conversation is the basis for the interaction between the public account and the user. At present, there are mainly several types of messaging services in public accounts, which are used in different scenarios.


1)群发消息:公众号可以以一定频次(订阅号为每天1次,服务号为每月4次),向用户群发消息,包括文字消息、图文消息、图片、视频、语音等。
2)被动回复消息:在用户给公众号发消息后,微信服务器会将消息发到开发者预先在开发者中心设置的服务器地址(开发者需要进行消息真实性验证),公众号可以在5秒内做出回复,可以回复一个消息,也可以回复命令告诉微信服务器这条消息暂不回复。被动回复消息可以设置加密(在公众平台官网的开发者中心处设置,设置后,按照消息加解密文档来进行处理。其他3种消息的调用因为是API调用而不是对请求的返回,所以不需要加解密)。
3)客服消息:在用户给公众号发消息后的48小时内,公众号可以给用户发送不限数量的消息,主要用于客服场景。用户的行为会触发事件推送,某些事件推送是支持公众号据此发送客服消息的,详见微信推送消息与事件说明文档。
4)模板消息:在需要对用户发送服务通知(如刷卡提醒、服务预约成功通知等)时,公众号可以用特定内容模板,主动向用户发送消息。


2. The web page in the public account

Many complex businesses In this scenario, services need to be provided through web pages. In this case, you need to use:


1)网页授权获取用户基本信息:通过该接口,可以获取用户的基本信息(获取用户的OpenID是无需用户同意的,获取用户的基本信息则需用户同意)
2)微信JS-SDK:是开发者在网页上通过JavaScript代码使用微信原生功能的工具包,开发者可以使用它在网页上录制和播放微信语音、监听微信分享、上传手机本地图片、拍照等许多能力。


Typical case introduction

The public accounts worth learning from are mainly service accounts. We will list and introduce them as follows:

China Merchants Bank Credit Card Center

1475976725478562.png

If you are Cardholders can quickly check credit card bills, limits and points; quickly repay and apply for bill installments; WeChat transfers manual services; credit card consumption, WeChat free reminders. If you are not a cardholder, you can apply for a card via WeChat!



招商银行公众号通过提示消息引导用户将自己的微信号和信用卡号安全绑定。
用户可以通过该公众号查询账单、收取刷卡通知等功能,这是由招行开发人员通过公众号接口实现的功能。



##China Southern Airlines

1475976761369506.png

You can check in, select seats, check flight information, check the weather of the destination city, and provide professional services to Sky Pearl members.


南方航空公众号可以让用户将明珠会员服务和微信号绑定起来。
用户可以通过该公众号预订机票、查询订单,甚至办理登机牌。



Guangdong Unicom

1475976821664782.png

You can use WeChat Bind mobile phone number, points traffic, package balance, mobile Internet traffic, WeChat exclusive traffic inquiry, customer service consultation.


广东联通公众号可以绑定手机号,来查询流量、套餐等等功能。
广东联通更与微信深度合作,购买微信沃卡可以获得微信五大特权。