loginFB

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

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