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.
{
  "text": "# Example\nLogging in via Facebook.",
  "sidebar": true
}
{
  "codes": [
    {
      "code": "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){ \n  alert(\"success_\" + token); \n},function(error) { \n  alert(\"error_\" + JSON.stringify(error)); \n});",
      "language": "javascript",
      "name": "Angular 5 apps"
    },
    {
      "code": "Apperyio.User.loginFB(\"FB APP Id\", \"https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/\", \"<Your Database Api Key>\").then(function(token){ \n  alert(\"success_\" + token); \n},function(error) { \n  alert(\"error_\" + JSON.stringify(error)); \n});",
      "language": "javascript",
      "name": "AngularJS apps"
    },
    {
      "code": "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){ \n  alert(\"success_\" + token); \n},function(error) { \n  alert(\"error_\" + JSON.stringify(error)); \n});",
      "language": "javascript",
      "name": "JQM"
    }
  ],
  "sidebar": true
}