|
@@ -65,14 +65,14 @@ function testAPI() { // Testing Graph API after login. See
|
|
|
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);
|
|
|
-
|
|
|
- // 設定欄位預設值
|
|
|
- $('#email').text(response.email);
|
|
|
- $('#name').text(response.name);
|
|
|
-
|
|
|
- // 隱藏FB登入按鈕
|
|
|
- $('#fb_login').hide();
|
|
|
});
|
|
|
+
|
|
|
+ // 設定欄位預設值
|
|
|
+ $('#email').text(response.email);
|
|
|
+ $('#name').text(response.name);
|
|
|
+
|
|
|
+ // 隱藏FB登入按鈕
|
|
|
+ $('#fb_login').hide();
|
|
|
};
|
|
|
</script>
|
|
|
|