|
@@ -3,24 +3,23 @@
|
|
|
|
|
|
utf8 = { toByteArray: utf8toByteArray };
|
|
utf8 = { toByteArray: utf8toByteArray };
|
|
|
|
|
|
- window.fbAsyncInit = function() {
|
|
|
|
- FB.init({ appId: /* "559978657446014" */ "154227314626053",
|
|
|
|
|
|
+window.fbAsyncInit = function() {
|
|
|
|
+
|
|
|
|
+ FB.init({ appId: /* "559978657446014" */ "154227314626053",
|
|
channelUrl: 'http://kakaranet.com/channel.html',
|
|
channelUrl: 'http://kakaranet.com/channel.html',
|
|
status: true, cookie: true, xfbml: true, oauth: true });
|
|
status: true, cookie: true, xfbml: true, oauth: true });
|
|
|
|
|
|
- FB.getLoginStatus(function(response) {
|
|
|
|
- if(typeof setFbIframe == "function"){
|
|
|
|
- var inIframe= top!=self;
|
|
|
|
- setFbIframe(inIframe);
|
|
|
|
- if(inIframe && response.status == 'connected' && fbLogin)
|
|
|
|
- FB.api("/me?fields=id,username,first_name,gender,last_name,email,birthday",
|
|
|
|
- function(response){ fbLogin(response);});
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+// FB.getLoginStatus(function(response){
|
|
|
|
+// if(response.status == 'connected' && fbLogin)
|
|
|
|
+// FB.api("/me?fields=id,username,gender,first_name,last_name,email,birthday",
|
|
|
|
+// function(response){ response.facebook = true; fbLogin(response);});
|
|
|
|
+// });
|
|
|
|
+
|
|
};
|
|
};
|
|
|
|
|
|
function fb_login(){
|
|
function fb_login(){
|
|
FB.getLoginStatus(function(response){
|
|
FB.getLoginStatus(function(response){
|
|
|
|
+ console.log("Login Status: "+response.status);
|
|
if(response.status == 'connected'){
|
|
if(response.status == 'connected'){
|
|
if(fbLogin)
|
|
if(fbLogin)
|
|
FB.api("/me?fields=id,username,gender,first_name,last_name,email,birthday",
|
|
FB.api("/me?fields=id,username,gender,first_name,last_name,email,birthday",
|