Browse Source

Added jQuery

gh-pages
Titouan Rigoudy 11 years ago
parent
commit
c2ba07ed42
2 changed files with 8 additions and 7 deletions
  1. +4
    -6
      fb.js
  2. +4
    -1
      index.html

+ 4
- 6
fb.js View File

@ -11,13 +11,11 @@ function statusChangeCallback(response) {
testAPI();
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
document.getElementById('status').innerHTML = 'Please log ' +
'into this app.';
$('#status').html('Please log into this app.');
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
document.getElementById('status').innerHTML = 'Please log ' +
'into Facebook.';
$('#status').html('Please log into Facebook.';
}
}
@ -72,8 +70,8 @@ function testAPI() {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Successful login for: ' + response.name);
document.getElementById('status').innerHTML =
'Thanks for logging in, ' + response.name + '!';
$('#status').html(
'Thanks for logging in, ' + response.name + '!');
});
}

+ 4
- 1
index.html View File

@ -5,7 +5,10 @@
<meta charset="UTF-8">
</head>
<body>
<script id="fbscript" src="fb.js"></script>
<script id="jquery" src="http://code.jquery.com/jquery-2.1.1.min.js">
</script>
<script id="fbscript" src="fb.js">
</script>
<!--
Below we include the Login Button social plugin. This button uses


Loading…
Cancel
Save