1. Message description
The message mode of WeChat public account is divided into 2 types: editing mode and development mode;
Editing mode:
Message by WeChat public platform server processing. When a user sends a message to a public account, the WeChat public platform server will reply according to the message rules defined by the public account on the WeChat public platform. If there is no match, then there will be no reply. This is why we have When sending a message to a public account, the reason why the message was not received;
Of course, the WeChat public account can selectively reply to a user's message, that is, in the message list of the WeChat public platform , you can reply to the message sent by a user;
Development mode:
The message is processed by the developer server. When the user sends a message to the public account, the WeChat public platform server will The sent message is forwarded to the developer server, and the developer server replies to the message according to its own business packaging (for example: it can be a random reply, or it can be a fixed reply to a message, etc., such as the public account of China Merchants Bank), and then the reply message Sent to the WeChat public platform server; after the WeChat public platform server receives the message, it sends the message to the user;
Of course, you can also reply to the message sent by a user in the WeChat public platform;
In addition: For the menu of WeChat public accounts, when we click on a menu, a message is also sent to the public account, but the user experience is different (one is interface operation, the other is message sending), but the essence It’s the same as above;
2. Logic flow chart
Let’s first take a look at the flow chart when the user directly sends a message
( Figure 1)
If the public account has a menu, clicking on the menu is actually sending a message, but it is slightly different; as shown below:
If the menu is Web page link menu, then you can directly access the web page in WeChat;
If it is an event menu, it is equivalent to sending a message, and the entire process is the same as (Figure 1);
The above is the detailed content of WeChat public account development: introduction to message principles. For more information, please follow other related articles on the PHP Chinese website!