Permalink
Browse files

Fixed bugs as a result of FB. being protected in the FB JS SDK.

  • Loading branch information...
1 parent d928169 commit 7e846783018fbc15e056c3e360b20dd67ff41317 @mattwkelly committed Jun 25, 2012
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# 2011-10-10:v6
+# 2012-06-25:v11
# Explicitly cached entries
index.html
@@ -26,11 +26,11 @@ FB.Event.monitor('auth.statusChange', function(session) {
console.log('Got the user\'s name and picture: ', response);
//Update display of user name and picture
- if (FB.$('user-name')) {
- FB.$('user-name').innerHTML = user.name;
+ if (document.getElementById('user-name')) {
+ document.getElementById('user-name').innerHTML = user.name;
}
- if (FB.$('user-picture')) {
- FB.$('user-picture').src = user.picture;
+ if (document.getElementById('user-picture')) {
+ document.getElementById('user-picture').src = user.picture;
}
}
@@ -40,9 +40,9 @@ function getUserBasicInfo() {
var markup = '<div class="data-header">Your information:</div>';
//Update display of user name and picture
- if (FB.$('user-info')) {
+ if (document.getElementById('user-info')) {
markup = markup + '<strong>User ID:</strong> ' + user.id + '<br />' + '<strong>Name:</strong> ' + user.name + '<br />' + '<strong>Profile picture URL:</strong> <a href="' + user.picture + '" target="_blank">' + user.picture + '</a><br />';
- FB.$('user-info').innerHTML = markup;
+ document.getElementById('user-info').innerHTML = markup;
clearAction();
}
@@ -56,7 +56,7 @@ function getUserFriends() {
markup = markup + '<img src="' + friendsInfo[i].picture + '">' + friendsInfo[i].name + '<br />';
}
- FB.$('user-friends').innerHTML = markup;
+ document.getElementById('user-friends').innerHTML = markup;
}
//Get the user's check-ins
@@ -69,7 +69,7 @@ function getCheckIns() {
clearAction();
if (!response.error) {
- displayCheckIns(response.data, FB.$('checkins'));
+ displayCheckIns(response.data, document.getElementById('checkins'));
}
});
}
@@ -157,7 +157,7 @@ function getNearby() {
clearAction();
console.log('Got some places near you: ', response);
if (!response.error) {
- displayPlaces(response.data, FB.$('locations-nearby'));
+ displayPlaces(response.data, document.getElementById('locations-nearby'));
}
});
});
@@ -54,14 +54,14 @@ function setAction(msg, hideBackground) {
document.getElementById('action').style.opacity = '.9';
}
- FB.$('msg').innerHTML = FB.String.escapeHTML(msg);
+ document.getElementById('msg').innerHTML = FB.String.escapeHTML(msg);
window.scrollTo(0, 1);
}
//Clears the modal dialog
function clearAction() {
- FB.$('msg').innerHTML = '';
+ document.getElementById('msg').innerHTML = '';
document.getElementById('action').style.display = 'none';
}

0 comments on commit 7e84678

Please sign in to comment.