# Can't get authentication with Facebook work

**URL:** <https://forum.ionicframework.com/t/cant-get-authentication-with-facebook-work/48263>\
**Category:** uncategorized\
**Created:** [April 3, 2016, 7:23pm UTC](https://forum.ionicframework.com/t/cant-get-authentication-with-facebook-work/48263 "2016-04-03T19:23:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fani](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fani](https://forum.ionicframework.com/u/fani)\
**Post date:** [April 3, 2016, 7:23pm UTC](https://forum.ionicframework.com/t/cant-get-authentication-with-facebook-work/48263/1 "2016-04-03T19:23:23Z")

</div>

Hello,  
after trying many times with the native Facebook authentication (all the plugins fail ☹ ) now I’v just uploaded my app to the Ionic Framework, and I’d like to use its built-in authentication.  
I followed the tutorial, and put the code in my existing app.

This is my LogIn function

```
    this.LoginWithFb = function() 
    { 
         alert('LoginWithFb');
         Ionic.Auth.login('facebook', {'remember': true})
             .then(function(response) 
                      {
                        if (response.authResponse) 
                            { ... }
                        else if (response.status === 'not_authorized') 
                            { ... }
                        else 
                            {...}
                      },
                    function(error) 
                        { alert(error); }
                   ) .catch(function(err)
                         {...});
    };

```

However, when I call it to register/login, the Facebook page appear, with a message like : "you are not logged in: Log in and try again"  
but it’s just what I am trying to do…  
What’s the problem there?
