loginTwitter

Apperyio.User.loginTwitter(clientId, callbackUrl, [dbId])

Logging in via Twitter. Returns promise.

Parameters

This function has the following parameters:

Arguments

Description

clientId

Social provider client id.

callbackUrl

URL for redirecting after user grants access.

dbId

Database API key. Optional if default database id is set.

Example

Logging in via Twitter.

this.Apperyio.user.loginTwitter("Twitter Consumer Key (API Key)", "https://appery.io/app/view/<YOUR APPERY.IO APP ID>/assets/static/social_login.html", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});
Apperyio.User.loginTwitter("Twitter Consumer Key (API Key)", "https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});
Apperyio.User.loginTwitter("Twitter Consumer Key (API Key)", "https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/<Your_Login_Screen_Name>", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});