Skip to content

Commit 262c64f

Browse files
author
armaanbindra
committed
Facebook login, fixed display username finally
1 parent 87b5ead commit 262c64f

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

parseFunctions.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,8 @@ document.ontouchmove = function(event){
1111
//event.preventDefault();
1212
}
1313
if(checkUserLogin()){
14-
15-
FB.getLoginStatus(function(response){
16-
if(response.status == "connected")
17-
{
18-
alert("login status connected");
19-
FB.api(
20-
"/me",
21-
function (response) {
22-
if (response && !response.error) {
23-
//console.log(response);
24-
var firstName = ""+response.first_name;
25-
var lastName = ""+response.last_name;
26-
$(".playerUsername").html(firstName);
27-
prepareGameStage();
28-
}
29-
}
30-
);
31-
}
32-
else{
33-
$(".playerUsername").html(titleCase(Parse.User.current().getUsername()));
34-
prepareGameStage();}
35-
}
36-
);
14+
$(".playerUsername").html(titleCase(Parse.User.current().getUsername()));
15+
prepareGameStage();
3716
}
3817

3918
function createUser(username,password,email)

0 commit comments

Comments
 (0)