[Open-source] Easy 4-step QQ login, no need for any code skills [no language boundaries], 4-step skills

Source: Internet
Author: User
Tags openid

[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

Related Article

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.