WeChat Member registration and development [with source code]: webpage authorization, get code on the current page

Source: Internet
Author: User
Tags openid
Development scenario: Author's homepage: skyapp studio home. zhubajie. com7145093 needs to guide users on the public platform to click the link to enter the registration page. The user's openid needs to be obtained on the registration page. The core technology is to use web page authorization and get openid immediately through js when authorization code is obtained. After web page authorization

Development scenario: author Home Page: skyapp studio http://home.zhubajie.com/7145093/ needs to guide the public platform users click the link to enter the registration page, in the registration page needs to get the user's openid. The core technology is to use web page authorization and get openid immediately through js when authorization code is obtained. After web page authorization

 

Development scenario:

Author homepage: skysky app studio http://home.zhubajie.com/7145093/

You need to instruct the public platform users to click the link to enter the registration page. On the registration page, you need to obtain the user's openid. The core technology is to use web page authorization and get openid immediately through js when authorization code is obtained.

Most of the articles on the Internet about how to obtain openid step by step after webpage authorization are explained in theoretical steps. There is very little content on How to Get openid as quickly as possible on the code. I am very angry and decided to write down the code and share it with you.


This process requires a front-end Page code and a backend Helper Program. Here, the front-end is html + js and the back-end is php.

Directly go to the Code, and the annotations in the Code are clear:

Front-end: index.html

 
 
 
 
 
 Member registration

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.