简体   繁体   English

Facebook登录无法构建

[英]Facebook Login fails to build

I'm developing an App which requires facebook login. 我正在开发一个需要登录facebook的应用程序。 The app could build easily when I didn't had implemented the facebook login. 当我没有实现facebook登录时,应用程序可以轻松构建。

After implementing it, the app cannot build and it doesn't give me a clear error. 实现后,应用程序无法构建,它不会给我一个明确的错误。 I've already added the facebook plugin "Facebook Connect" to my project. 我已经将facebook插件“Facebook Connect”添加到我的项目中。

Here's my code: 这是我的代码:

  if(window.navigator.onLine)
    {
   setTimeout(function(){
    var fbLoginSuccess = function (userData) {
                console.log("UserInfo: ", userData);
                }

                facebookConnectPlugin.login(["public_profile"], fbLoginSuccess,
                  function loginError (error) {
                    console.error(error)
                  }
              );
},500);
}

On the plugin I already set the correct AppId and AppName. 在插件上我已经设置了正确的AppId和AppName。

When I try to test, by building it, nothing happens. 当我尝试测试时,通过构建它,没有任何反应。 It gives me an error when I try to upload it. 当我尝试上传它时,它给我一个错误。 But it doesn't say cleary what is the error. 但它并没有说清楚错误是什么。

you can try read more here 你可以尝试在这里阅读更多

facebookConnectPlugin.login( ["public_profile","email"],function (response) {
                if(response.authResponse.userID!=''){
                    facebookConnectPlugin.api(response.authResponse.userID+"/?fields=id,email,first_name", ["public_profile"],
                    function (response) {
                        console.log(response);
                    },
                    function (response) {
                        console.log(response);
                    });
                }    
                }, 
                function (response) {   
                        console.log(response);
               });

let me know if its not working 如果它不起作用,请告诉我

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM