[Open-source] Easy 4-step QQ login, no need for any code skills [no language boundaries], 4-step skills
It is said that on the 17th, a simple tutorial was issued on the 17th, and this was encapsulated after the qq verification was passed. Now it is released ~~
This is an open source project I encapsulated: https://github.com/dunitian/LoTQQLogin
--------------------------------------------
Apply first
Create an application
Website or mobile
Pay attention to the callback address (something will be uploaded during login)
Take a website as an Example
The verification is successful. For details, refer to the prompt at creation.
Remember the above id
This is your api Management page (more can be applied)
Let's take a look at the highlights:
Step 1: Introduce jq
<Script type = 'text/javascript 'src = 'HTTP: // ajax.useso.com/ajax/libs/jquery/1.7.2/jquery.min.js? Ver = 3.4.2 '> </script>
Step 2: replace data-appid with your id and data-redirecturi with your callback address.
<Script type = "text/javascript" src = "http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid ="101271485"Data-redirecturi ="Http://www.dkill.net/Index"Charset =" UTF-8 "> </script>
Step 3: Introduce lotqq. js
<Script src = "JavaScript/lotqq. js"> </script>
Step 4: PASS Parameters and set your callback functions (for example, store them )【Lotqq is the id of the logon icon you want to place.]
<Script type = "text/javascript">
$. Lotqq ('101271485','Http://www.dkill.net/Index','Lotqq', Function (data ){
// Callback function for some storage ~~~ (The data array has the data you need)
Console. log ('name: '+ data. Name );
Console. log ('openid: '+ data. OpenId );
Console. log ('accesstoken: '+ data. AccessToken );
Console. log ('figureurl: '+ data. Figureurl );
});
</Script>
Effect:
Initial:
Jump Logon:
After Logon: (style adjustable)
Value that can be obtained: (you can store the value based on the callback function)
Any bugs or new requirements can be raised to me ~~ Good night ~
[Open-source] QQ login can be completed in four simple steps without any coding skills. [no language boundaries ~ Net programmer welfare: http://www.cnblogs.com/dunitian/p/5056784.html