[WeChat development] [JAVA implementation] Authorized login of WeChat official account web page

When searching for information on the Internet, netizens said that the official documents are too rubbish and difficult to understand. Now I personally sort out an easy-to-understand and easy-to-use, I hope it can help you who are new to the WeChat interface.

Please see the flowchart! If you understand the picture, you will understand half of it:

In fact, the overall process generally only needs three steps: the user clicks the login button (actually equivalent to a link) ---" the user clicks the authorization login ----" to obtain the user information code.

Then it only takes three steps to get the user information code: get code ----" get access_token and openId through code ---" get user information (including union) through access_token and openId.

The above is the overall routine. Of course, it is also available on the official website, but how to achieve it?

Don't worry, let's go step by step!

Step 1: WeChat login button

It is actually a link, but it is a little troublesome to get this link.

1. Settings. WeChat public platform---"Interface authority---"Web page authorization---"Modify---"Set the web page authorization domain name (domain name, excluding http://), which is actually the project path for WeChat to adjust your java method Or the domain name of the project, such as: www.zzff.net/pp --- "Click Settings and pop up a page (roughly, put MP_verify_31qRIDcjN8ZD1lVJ.txt under your project path

Guess you like

Origin blog.csdn.net/qq_27246521/article/details/97392650