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?

When developing the WeChat public platform, you need to learn the following knowledge:

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.