Mike 3 vuotta sitten
vanhempi
commit
408ec58ccd
1 muutettua tiedostoa jossa 2 lisäystä ja 8 poistoa
  1. 2 8
      desktop11/index.html

+ 2 - 8
desktop11/index.html

@@ -64,22 +64,16 @@ window.fbAsyncInit = function() {
 function testAPI() {                      // Testing Graph API after login.  See statusChangeCallback() for when this call is made.   
     FB.api('/me/?fields=id,name,email', function(response) {
         console.log('FB API回傳資料: ' + JSON.stringify(response));
-        console.log('成功登入: ' + response.name + ', email = ' + response.email + ', id = ' + response.id);
 
-        if (response.id) {
-            console.log('response.id = ' + response.id);
-            
+        if (response.id) {           
             // 設定欄位預設值
-            console.log('response.email = ' + response.email);
             document.getElementById("email").value = response.email;
-            
-            console.log('response.name = ' + response.name);
             document.getElementById("name").value = response.name;
 
             console.log('隱藏FB登入按鈕');
 
             // 隱藏FB登入按鈕
-            $('#fb_login').hide();
+            document.getElementById("fb_login").style.display = 'none';
         }
     });
 };