Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

getting error code 4201- "user cancelled dialog #259

Closed
icernn03 opened this issue Jul 9, 2016 · 2 comments
Closed

getting error code 4201- "user cancelled dialog #259

icernn03 opened this issue Jul 9, 2016 · 2 comments

Comments

@icernn03
Copy link

icernn03 commented Jul 9, 2016

I am getting error "4201-user cancelled dialog" before login page is loaded. login page does load even after the error but does nothing even if login button is clicked. Login data and token received after authentication is sent to my server to authenticate my api for the application
Can I directly send facebook auth response to my server and receive authentication from my api too

facebookConnectPlugin.login(["public_profile","user_birthday"],function(result){
    console.log(result);
    facebookConnectPlugin.api(result.authResponse.userID+"/?fields=id,name,picture,birthday",['user_birthday'],
      function onSuccess (userData) {
        console.log("Result: ", userData);

        var credentials = {
          'provider' :'facebook',
          'uid' : result.authResponse.userID,
          'accessToken' : result.authResponse.accessToken,
          'name' : userData.name,
          'picture' : userData.picture.data.url,
          'birthday' : userData.birthday
        };
        $http.post(configs.domain+'/register',{'credentials':credentials}).then(function(response){
          console.log(response);
        });
      },function onError (error) {
        console.error("Failed: ", error);
      } 
    );
    },function(error){
      console.log(error);
    });
@oliviertassinari
Copy link

Duplicate of #125?

@robertarnesson
Copy link

see #125 and my 2 cents are run facebookConnectPlugin.getLoginStatus first to see if user is already logged in, and only if not you run facebookConnectPlugin.login

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants