Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always login with developer account althoug i try to login different facebook accounts #1352

Open
casa90 opened this issue May 19, 2017 · 0 comments

Comments

@casa90
Copy link

casa90 commented May 19, 2017

My problem is that when I login I use different facebook accounts, but login data is always developer facebook accounts data.

var success = function (data) {           
            console.log(data);
            return;
            var namesurname = data.name;
            var array = namesurname.split(" ");
            var name = array[0];
            var surname = array[1];
            var email = data.email;
            var id = data.id;
            var photo = "https://graph.facebook.com/" + id + "/picture?type=large";
            var item = {
                facebookId: id,
                name: name,
                surname: surname,
                email: email,
                photo: photo,
                username: null,
                password: null,
                deviceId: deviceId,
                deciveName: deviceName,
                deviceType: deviceType,
                authType: "Facebook"
            }
            
            $.ajax({
                type: 'POST',
                url: LoginUrl,
                data: JSON.stringify(item),
                success: function (data, status, xhr) {
                  
                    if (data.Status == 200) {
                        localStorage.setItem("userId", data.Result);
                        window.location.href = "Home.html";
                    }
                    else {                        
                        return;
                    }
                },
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                beforeSend: function () {},
                complete: function () {}
            });
           


        }
        var failure = function (error) {            
            console.log(error);
            

        }
        var fbLoginSuccess = function (userData) {
            console.log(userData);
            facebookConnectPlugin.api(userData.authResponse.userID+"?fields=id,name,picture,email", ["public_profile", "email"], success, failure);
        }
        document.getElementById("login").onclick = foo2;
        function foo2(){facebookConnectPlugin.login(["public_profile"],fbLoginSuccess,function(error) {console.log("" + error);});}
       
@casa90 casa90 changed the title Always login with developer account Always login with developer account althoug i try to login different facebook accounts May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant