Integrating Renren (人人網) Accounts
This topic explains how to allow your users to sign up for and log in to your mobile app with their Renren (人人網) account. Just add a few parameters in the developer portal and a few lines of code in your mobile app and you will be social-ready!
To get started, you first need to create a Renren application and get your Renren (人人網) API key, secret key, and app ID. For the detailed instructions, see the Renren official documentation.
You will need to fill in the following information.
- Application name
- Application category
- Application domain
- Application description
- Application icon (16x16, 48x48, 75x75 and 100x100)
When your Renren application is created, you will get a Renren (人人網) API key, secret key, and app ID.
Take the following steps in the developer portal to configure your application by setting your Renren (人人網) API key, secret key, and app ID.
Click on the "Edit" button in your application console in the developer portal.
Click "SOCIAL NETWORKS".
Click "Renren" to open the configuration screen for Renren.
Set your Renren (人人網) API key, secret key, and app ID.
The following example illustrates how to authenticate a user with their Renren account:
The basic steps are as follows.
Get a Renren access token. For the detailed instructions, see the Renren official documentation.
Set the Renren access token to the
Authenticate the user with the
logIn()method. The first argument specifies the target social network,
KiiSocialNetworkName.RENREN. If the specified Renren account is new to Kii Cloud, the user is registered before the login.
If the login is successful, the user is cached inside the SDK as the current user and you can get the user information with the
You can link existing Kii users to their Renren accounts. Linked users can log in to Kii Cloud via the Renren authentication.
Here is the sample code for linking a Kii account to a Renren account. You basically just need to execute the
Note that this sample code assumes that your mobile app has obtained a Renren access token. For getting a Renren access token, see the Renren official documentation.
Here is the sample code for unlinking a Kii account from a Renren account. You basically just need to execute the