Joke Collection Website - Blessing messages - What do you need to learn in the development of WeChat public platform?
What do you need to learn in the development of WeChat public platform?
1, familiar with a programming language, such as. net、php、Java;
2. To start the development mode of official WeChat account, we need to understand the principle of WeChat public platform.
3. Micro-signals can only achieve various functions in the network environment. Prepare the necessary conditions. The first is an external network server, so that our project can be deployed on it. The second is the WeChat public platform account. You can learn more about the development of wechat enterprise number callback page-the reply of enterprise number information.
Development steps of WeChat public platform:
First, the WeChat server should establish a connection with the URL address of our server project. A web project named Weixin was built in local eclipse, in which a WeixinServlet was built. Then Servlet is the address that handles the communication between our server and WeChat server. When the war package is deployed on the mopaas cloud server, it can be accessed through the browser: http://extranetserveraddress/weixin/weixinservlet, so the project we deployed will not be a problem. After opening the WeChat account and entering the developer mode, we will be asked to enter a URL address, that is, the above address where our project establishes communication with WeChat, including the processed Servlet, http://external server address/weixin/weixin Servlet, enter relevant parameters and confirm, and the WeChat server will call the doGet method of the servlet we defined. The following message processing is to call the post method. After our server verifies the corresponding parameters, the successful echostr string information will be returned to our WeChat server. Then the WeChat platform we applied for will be connected with our Servlet, which means that this address has been successfully bound. In the future, the information we send through WeChat will be transmitted to the Servlet on our server through URL address for processing.
When a user sends a message, a text picture message or clicks a custom menu event to the official WeChat account, he sends a message to the official WeChat account through the URL address we bind, and the WeChat server encapsulates our message into data in xml format, and then submits the message to the post method, which defines a processing class on our server. What our server needs to do is to parse the string in xml format sent by WeChat server, and then convert it into XML string information in WeChat output format after corresponding logical processing, and then return it to WeChat server through HttpServletResponse, and then WeChat server sends it to our client for response.
The format of the text information received by xml in WeChat is sent to WeChat server by users, and then sent to our server after conversion. Schematic diagram of message interaction of WeChat.
- Previous article:Catalogue of chapters of juvenile senior officials
- Next article:What level is the Sea Media Center?
- Related articles
- New Year greetings to friends in the Year of the Ox.
- Anhui Vocational College of Industry and Commerce Teachers' Salary
- How to ask for leave from the leader?
- How should contemporary young people save money with dignity?
- Can the official account login information of micro-health WeChat in Nanping CDC be modified?
- What does the loan receipt mean?
- Why can't Huawei's p7 mobile phone receive SMS?
- What does it mean when your phone number frequently receives garbled messages from Oppo after losing it?
- Hello, why is my 7 102 message very quiet, the vibration is very weak, and the bell is not too loud?
- Apocalypse Films’ latest and best TV shows in 2022