|
@@ -2,28 +2,25 @@ import AsyncTask from './asyncTask'
|
|
|
|
|
|
const gTask = new AsyncTask()
|
|
|
|
|
|
-window.fbAsyncInit = () => {
|
|
|
+/* window.fbAsyncInit = () => {
|
|
|
FB.init({
|
|
|
appId: '683963442752208',
|
|
|
cookie: true, // Enable cookies to allow the server to access the session.
|
|
|
- xfbml: true, // Parse social plugins on this webpage.
|
|
|
version: 'v13.0',
|
|
|
})
|
|
|
+} */
|
|
|
|
|
|
- // FB.getLoginStatus(statusChangeCallback)
|
|
|
-}
|
|
|
-
|
|
|
-function statusChangeCallback(response: any) {
|
|
|
+function fbStatusChangeCallback(response: any) {
|
|
|
// Called with the results from FB.getLoginStatus().
|
|
|
console.log('statusChangeCallback')
|
|
|
console.log(response) // The current login status of the person.
|
|
|
if (response.status === 'connected') {
|
|
|
// Logged into your webpage and Facebook.
|
|
|
- testAPI()
|
|
|
+ fbConnect()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function testAPI() {
|
|
|
+function fbConnect() {
|
|
|
// Testing Graph API after login. See statusChangeCallback() for when this call is made.
|
|
|
FB.api('/me?fields=id,name,email', function (response: any) {
|
|
|
console.log(response)
|
|
@@ -36,7 +33,7 @@ function testAPI() {
|
|
|
}
|
|
|
|
|
|
export function FBLogin() {
|
|
|
- FB.login(statusChangeCallback, { scope: 'public_profile,email' })
|
|
|
+ FB.login(fbStatusChangeCallback, { scope: 'public_profile,email' })
|
|
|
}
|
|
|
|
|
|
export function AppleLogin() {
|