Home >Backend Development >PHP Tutorial >How is the WeChat login of this site implemented?

How is the WeChat login of this site implemented?

WBOY
WBOYOriginal
2016-07-06 13:51:441024browse

Generally common WeChat scan code login, after clicking login, the page jumps to WeChat, where the QR code is displayed, and then scan the code to log in.
But I saw this website, http://www.lativ.com. After clicking to log in, the page did not jump to WeChat. Instead, the QR code was displayed on its own page. After scanning the code, You can log in.
How is this effect achieved?
How is the WeChat login of this site implemented?

Reply content:

Generally common WeChat scan code login, after clicking login, the page jumps to WeChat, where the QR code is displayed, and then scan the code to log in.
But I saw this website, http://www.lativ.com. After clicking to log in, the page did not jump to WeChat. Instead, the QR code was displayed on its own page. After scanning the code, You can log in.
How is this effect achieved?
How is the WeChat login of this site implemented?

https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN

It is speculated that when you click the login button, it will request the WeChat API and then obtain the QR code through the WeChat URL and display it

This is the second method officially given by WeChat:
The main purpose of JS WeChat login: the website hopes that users can complete the login within the website, without jumping to the WeChat domain to log in and then return, to improve WeChat login fluency and success rate.
For details, please refer to WeChat official documentation

Create a website application on the WeChat open platform and implement it step by step according to the above document

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn