Chapter 5 has already talked about how to handle messages sent by users. This chapter will talk about how to respond to user requests. Novices must be confused when they see this title. Don’t be confused. The interface of WeChat is just like this. When replying to pictures, music, voice, etc., we need to upload our media files to the WeChat server before we can use it. I don’t know what the considerations are for this approach, and the message body formats sent by the customer service interface and the group sending interface are actually different when replying to messages to users. It is estimated that these interfaces were not written by the same person, and the code was not unified. We loser developers can only complain. Before talking about the upload and download interface, we need to first talk about the access_token acquisition method. In the process of WeChat interface development, access_token is crucial. It is the globally unique ticket of the official account. The official account needs to use access_token when calling each interface. Developers need to store it properly. At least 512 characters of space must be reserved for access_token storage. The validity period of access_token is currently 2 hours and needs to be refreshed regularly. Repeated acquisition will cause the last access_token to become invalid. Need to pay attention
1. Share several articles of passive reply
##Introduction: Chapter 5 has already talked about how to process messages sent by users. This chapter will talk about how to respond to user requests. Novices must be confused when they see this title. Don’t be confused. The interface of WeChat is just like this. When replying to pictures, music, voice, etc., we need to upload our media files to the WeChat server before we can use it. I don’t know what the considerations are for this approach, and the message body formats sent by the customer service interface and the group sending interface are actually different when replying to messages to users. It is estimated that these interfaces were not written by the same person, and the code was not unified. We loser developers can only complain. Talking about uploading...
2. Recommended articles about passive responses
Introduction: Chapter 5 has already talked about how to process messages sent by users. This chapter will talk about how to respond to user requests. Novices must be confused when they see this title. Don’t be confused. The interface of WeChat is just like this. When replying to pictures, music, voice, etc., we need to upload our media files to the WeChat server before we can use it. I don’t know what the considerations are for this approach, and the message body formats sent by the customer service interface and the group sending interface are actually different when replying to messages to users. It is estimated that these interfaces were not written by the same person, and the code was not unified. We loser developers can only complain. Talking about uploading...
3. Sample code sharing on the difference between post and get in HTML submission methods
Introduction: get submission, the submitted information is displayed in the address bar. Post submission, the submitted information is not displayed in the address bar, but is displayed in the message body.
4. Three steps to teach you how to access WeChat public platform development
##Introduction: After logging in to the official website of the WeChat public platform, on the public platform backend management page - Developer Center page, click the "Modify Configuration" button, fill in the server address (URL), Token and EncodingAESKey, where the URL is the development The interface URL used by users to receive WeChat messages and events. The token can be filled in by the developer arbitrarily and used to generate a signature (the token will be compared with the token contained in the interface URL to verify the security). EncodingAESKey is manually filled in by the developer or randomly generated, and will be used as the message body encryption and decryption key.
5.
Developer Mode of WeChat Development
Introduction: Fill in the server address (URL), Token and EncodingAESKey, where the URL is the interface URL used by developers to receive WeChat messages and events. Token can be filled in by developers and used to generate signatures (the Token will be compared with the Token contained in the interface URL to verify security). EncodingAESKey is manually filled in by the developer or randomly generated, and will be used as the message body encryption and decryption key. 6. WeChat development passive reply and upload and download files
##Introduction: This chapter will talk about how to respond to user requests. Novices must be confused when they see this title. Don’t be confused. The interface of WeChat is just like this. When replying to pictures, music, voice, etc., we need to upload our media files to the WeChat server before we can use it. I don’t know what the considerations are for this approach, and the message body formats sent by the customer service interface and the group sending interface are actually different when replying to messages to users. It is estimated that these interfaces were not written by the same person, and the code was not unified. We loser developers can only complain 7. Message body of WeChat development Signature and encryption and decryption
Introduction: The first few articles are mainly preparations for WeChat development, and there is nothing much Technical content. In the first and second articles, I mainly talked about using Peanut Shell to cooperate with VS for code debugging. I was once complained by garden friends that I was a joke invited by Peanut Shell. I had no choice but to distinguish myself from Peanut Shell. Boundaries, before entering the main text of this article, I will introduce to you ngrok, a tool that is more useful than peanut shells. I will not explain the benefits of ngrok in detail here. After all, it is not the focus of this article 8. WeChat Development Department Newbie Access Guide
Introduction: WeChat public platform news The working principle of the interface can be roughly understood like this: the process from the user side to the public account side is as follows. The user sends a message to the WeChat server, and the WeChat server posts the received message to the URL filled in by the user when accessing, and processes it in the URL. In the program, the legitimacy of the message is first judged. After the judgment is successful, the corresponding response is made based on the content of the message body. The principle is easy to understand, and it may be easier for those who have been exposed to sockets. 9. Java code example for receiving WeChat server post message body ##Introduction: This article mainly introduces the second step of Java WeChat public platform development in detail, the reception of WeChat server post message body, which has certain reference value. Interested friends can refer to it. 10. In Angularjs, the implementation method of $http passing parameters through the message body in a post request [Related Q&A recommendations]: Python Socket using Struct.pack package grouping issuesNetwork Programming - Java calls the write method of DataOuputStream to write the first byte of data and is missingphp - About WeChat Public Platform Voice Calling of identification resultspython - Can the Requests library customize the boundaryphp curl_init curl message header and message body
The above is the detailed content of Detailed explanations of 10 articles on message bodies. For more information, please follow other related articles on the PHP Chinese website!