loginFB

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

Logging in via Facebook. 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 Facebook.

this.Apperyio.user.loginFB("FB APP Id", "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.loginFB("FB APP Id", "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.loginFB("FB APP Id", "https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/<Your_Login_Screen_Name>.html", "<Your Database Api Key>").then(function(token){ 
  alert("success_" + token); 
},function(error) { 
  alert("error_" + JSON.stringify(error)); 
});