📜 ⬆️ ⬇️

Authorization through Chinese social networks

Any normal site / application now allows you to register using third-party accounts. And if there is more than enough information in English / Russian-speaking information, then in Chinese (in the Russian segment of the Internet) - the cat cried. Meanwhile, besides the fact that it is about 700 million Internet users, it is also more than 5 million Chinese who visited Russia in 2014 and about 500 thousand Chinese who remained in Russia for temporary / permanent residence - first of all students. Since the integration of the Chinese in the local society always goes awry, they prefer to use software that has been known since childhood, such as the QQ online messenger.

In this article I would like to highlight the process of integrating a login through QQ in mobile applications and on websites. It is very simple. I'll tell you on the example of our application for the Android platform:



The first thing we need is a basic QQ account. It is easy to register it - follow the link , fill in all the fields - that's ready. There is nothing to dwell on.
Second, you will need to improve your base account to a developer account. Go to the site and click on the 登陆 button (top right, where we login under our account), then go to the control center.
')


Here we need to fill out information about yourself. Foreigners are very much allowed, if there is a friend in China - it is easier to register for it, it will be easier to communicate with technical support, if not - that's okay too, but you will most likely have to use an online translator to communicate. If you still want to register as a developer from China, you need a virtual Chinese phone number, you can make it here:
www.wo-call.com (then it will be necessary to specify Shijiazhuang province as the address), or
www.jego.me (Shanghai).
I advise you to be truthful - they will then require your passport, and honesty has always been a virtue.



After they approve of you (in QQ there are not such cruel creatures as, for example, in Weibo, they usually do not find fault), the developer’s panel will become available to you. We need the button "Create application".



After that, there will be the usual process of creating an application. The main thing, do not forget to choose the item “free”, since the acceptance of payments from Chinese users is a separate large topic, this is not immediately available, if it is interesting, I will tell in the next article. By the same no one carps. Accordingly, do not forget to prepare an apk, if this is an Android application, a link to the Appstore, if it is an iOS, or your web application (in accordance with what you have chosen).



After the application passes approval and is released, it will automatically appear in the QQ web store on their QZone social network (if this is a web application), their android market (if this is an Android application). How to connect to their advertising grid and earn advertising revenue, how to integrate their cloud services, opportunities for promo, etc. - The topic is too extensive to dwell on it.



We are only interested in the login through their application. For this we need App ID and App Key. We see it after clicking on the name of the application.



In principle, everything is done. Now you just have to add a couple of lines of code to your application.
The full SDK for your platform can be downloaded here.
A full description of adding a login through QQ is also located by reference .

1) Follow the link and fill out a form to get the opportunity to login through QQ
2) click on the link image of the login button
3) Add a build path and set up androidmanifest
4) Add the callback code
5) Get Access_token
6) Get custom OpenID
7) If necessary, we obtain user data , set up news sharing in QZone, etc.

That's all. At first glance, it is difficult, at the second - there is no place easier. Those technical terms that are in the descriptions are easily picked up by the Google translator, in more complex cases I recommend using this dictionary.

I hope at least someone is useful.
UPD. According to the requirements of the Ministry of Industry and Information, the site \ application \ game in case they contain the content listed below will not be approved:
1) sexual content, incl. erotic. In the case of a body image, it should be covered below the neck and above the knees.
2) in the case of images of the faces of a real person, the written consent of the model is necessary
3) mentions and availability of gambling, gambling, the possibility of withdrawal of real money
4) images and information about medical products without appropriate licenses
5) references and images of drugs, weapons and other illegal contents
6) other content contrary to the laws of the PRC.

Source: https://habr.com/ru/post/254255/


All Articles