loginTwitter

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

Logging in via Twitter. Returns a Promise.

Parameters

This function has the following parameters:

ArgumentsDescription
clientIdSocial provider client id.
callbackUrlURL for redirecting after user grants access.
dbIdDatabase 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));
});