I'm developing an App which requires facebook login. The app could build easily when I didn't had implemented the facebook login.
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.
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.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.