Home >Backend Development >PHP Tutorial >PHP implements third-party login—QQ login method
This article mainly introduces the method of implementing third-party login-QQ login in PHP. Interested friends can refer to it. I hope it will be helpful to everyone.
Basic principles of oAuth
Prerequisites for accessing QQ login
Application AppID and Appkey
Log in to QQ Internet to apply for website application or mobile application access
After successfully applying according to the steps, you can see the corresponding AppId and AppKey after creating the application
Introduce the official SDK
Add test callback address
1. Add a virtual host locally **, for example, the domain name is test.gz06.cn, and then add this domain name to the hosts file
##127.0.0.1 localhost test.gz06.cn2. In the application information editing of QQ Internet, add the locally added test callback domain name to the callback address, separate it with;, click Verify again when modifying, and then save it
http://gz06.cn;http://test.gz06.cn/callback.php##3. Introduction Official SDK
4. SDK parameter configurationAccess and download to root SDK in the directory
http://test.gz06.cn/Connect2.1/
prompts that parameters need to be configured, click on it
Configuring the required parameters
The above is the entire content of this article, I hope it will be helpful to everyone's learning.
Related recommendations:
QQ third-party login function implementation case sharing in TP5 practical project
The above is the detailed content of PHP implements third-party login—QQ login method. For more information, please follow other related articles on the PHP Chinese website!