javascript

I am using the cordova-plugin-facebook4 plugin on my Phonegapp Cordova project and although the pop opens when I test the app on the browser it does nothing when I compile it and run on a mobile phone. What am I missing ??

Code being used:

logInWithFacebook = function() {
FB.login(function(response) {
  if (response.authResponse) {
       FB.api('/me', function(response) {
                var result_holder = document.getElementById('result_friends');
                result_holder.innerHTML = response.name;
         });
        } else {
            alert('User cancelled login or did not fully authorize.');
        }
    });
    return false;
}; 

Thanks in advance

链接地址: http://www.djcxy.com/p/79772.html

上一篇: Cordova:判断该页面是否在设备应用程序中打开

下一篇: JavaScript的