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)