From c84aa0a34a394e66ba6fd2dcd74ddbaae5bdd239 Mon Sep 17 00:00:00 2001 From: fengyuexingzi Date: Fri, 15 Jun 2018 11:20:13 +0800 Subject: [PATCH] facebook --- auth/facebook/login.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/auth/facebook/login.html b/auth/facebook/login.html index a40684b..52e4d57 100644 --- a/auth/facebook/login.html +++ b/auth/facebook/login.html @@ -30,6 +30,15 @@ statusChangeCallback(response); } + 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 + '!'; + }); + } + $(document).ready(function() { $.ajaxSetup({ cache: true }); $.getScript('https://connect.facebook.net/en_US/sdk.js', function(){