WeChat Development Learning diary (3): 6 points of experience and 6 points of diary

Source: Internet
Author: User

Development and Learning diary (3): 6 points of experience and 6 points of diary
1. token verification and request response
Token verification. Use the get method. Request entry, using the psot method. A public account or a lightweight application portal is a url. The same url can be divided into get and post. The four parameters are not null and must be verified. Parameters must also be verified during post, but echostr is not output.
During post, echostr may be empty. Do you want to check whether echostr is empty? Since no output is required, verification is not required.2. Access Credential access_token
Each time you get a credential, there is a certain expiration time. That is to say, it can be cached.
I haven't checked the code carefully yet.

3. Message request and response
FromUserName in the request-toUserName in the response
FromUserName when toUserName-response in the request 4. The interface is not an API.It is not very difficult. Many years ago, interfaces provided externally became very popular. APIS, functions, and methods are all input-processing-output.

5. Reuse and basic databaseButtons, menus, XML, and object conversion are reusable basic libraries. With object-oriented, it looks very clear. Different projects can be reused completely. 6. Develop a debuggerThere are quite a few on the Internet, and some people write it on their own.
I used the following:

Http://www.jeecg.org/forum.php? Mod = attachment & aid = token it should be noted that either full token verification is carried in the parameter, or special parameters are added, such as devMode = true, to avoid verification.

I use a method that includes a specific parameter, devMode = true.

Public static boolean checkSignature (TokenCheck tokenCheck ){

If (tokenCheck. getDevMode ()! = Null) {return true;} return checkSignature (tokenCheck. getSignature (), tokenCheck. getTimestamp (), tokenCheck. getNonce ());
} Xiao Lei FansUnion-Founder and owner of Wuhan jiutian bird Technology Co., Ltd.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.