Last active
August 29, 2015 14:21
-
-
Save cypressyi/c0663dfa9b52d59e0a67 to your computer and use it in GitHub Desktop.
Revisions
-
indieforlife revised this gist
May 17, 2015 . 1 changed file with 17 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,19 @@ //wrong // function testAPI(callback) { // console.log('Welcome! Fetching your information.... '); // FB.api('/me', function(response) { // console.log('Successful login for: ' + response.name + "/" + response.gender); // // document.cookie = "username =" + response.name; // // document.cookie = "gender =" + response.gender; // // document.location.href = "testing.html?name=" + response.name + "?gender=" + response.gender; // localStorage.setItem("name", response.name); // localStorage.setItem("gender", response.gender); // }); // callback(); // } //right function testAPI(callback) { console.log('Welcome! Fetching your information.... '); FB.api('/me', function(response) { @@ -7,11 +23,10 @@ function testAPI(callback) { // document.location.href = "testing.html?name=" + response.name + "?gender=" + response.gender; localStorage.setItem("name", response.name); localStorage.setItem("gender", response.gender); callback(); }); } testAPI(function() { document.location.href = "testing.html"; }); -
indieforlife revised this gist
May 17, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,6 @@ function testAPI(callback) { } testAPI(function() { document.location.href = "testing.html"; }); -
indieforlife created this gist
May 17, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ function testAPI(callback) { console.log('Welcome! Fetching your information.... '); FB.api('/me', function(response) { console.log('Successful login for: ' + response.name + "/" + response.gender); // document.cookie = "username =" + response.name; // document.cookie = "gender =" + response.gender; // document.location.href = "testing.html?name=" + response.name + "?gender=" + response.gender; localStorage.setItem("name", response.name); localStorage.setItem("gender", response.gender); }); callback(); } testAPI(function(){ document.location.href = "testing.html"; });