Java EE SSH framework QQ third party login and user binding (SDK version)

Source: Internet
Author: User

Before a friend with the JS SDK implementation of the SSH framework QQ third-party login function, but I found that using the JS SDK Some of the security problems can not be overcome, so I use the Java SDK to achieve this function!


, using Java SDK, the callback address should be set to an. Action link. (note!) Modify the callback address, the official will not be in time for you to approve, some people modify the callback address a year after the official did not give him approval, which means "modify the callback address is not as good as to re-apply a domain name!" Re-apply for a website access ")




use the official given Sdk4j.jar the console will print a lot of log information, which seriously affect the efficiency of the project, so I give up the use of the official Sdk4j.jar, switch to csdn a friend provides the compression package and tool Class (Http://download.csdn.net/detail/heyuanshan3/6282605#comment), I made some changes to what he offered (delete the log4j package, commented out all the code about log (), and finally, I copied the packages and classes to my project! (although I gave up the official package, the official demo still helped ...) I used the code from the login method in the official demo , the code in the callback method .

is the package and tool class provided by the traveler:


Copy these compressed packages and tools into your project:


Modify the Qqconnectconfig.properties file: (note, the use of the package provided by the Tao friends, there is a place and the official designation of the wording is different!) )


Finally, the login method and callback method take the code in the official demo:






Added a few validations:



Java EE SSH framework QQ third party login and user binding (SDK version)

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.