Integrar el inicio de sesión de Facebook en Intel XDK
Frecuentes
Visto 2,713 equipos
1
hope that some body answer.. thanks in advance
I trying to integrate Facebook Sign In in Intel XDK but I only gets a blank screen and a button Cancel on top... any help here is my code
function facebook_login(){
document.addEventListener("intel.xdk.facebook.login",function(e){
if (e.success == true)
{
var facebookUserID = "me"; //me = the user currently logged into Facebook
document.addEventListener("intel.xdk.facebook.request.response",function(e) {
console.log("Facebook User Friends Data Returned");
if (e.success == true) {
var data = e.data.data;
var outHTML = "";
for (var r=0; r< data.length; r++) {
outHTML += "<img src='http://graph.facebook.com/"
+ data[r]["id"]
+ "/picture' info='"
+ data[r]["name"] + "' />";
}
alert(outHTML);
document.removeEventListener("intel.xdk.facebook.request.response");
}
},false);
}
else
{
console.log("Unsuccessful Login");
}
}, false);
intel.xdk.facebook.login("publish_stream, publish_actions, offline_access");
}
2 Respuestas
0
I'm not 100% sure but if you look at the end of this page : https://software.intel.com/en-us/html5/articles/integrating-facebook-functionality-into-hybrid-apps-using-the-intel-xdk You'll see that you need to register your app through facebook and then build it. Bye.
Respondido 09 Jul 14, 12:07
0
The intel.xdk.facebook library only works in the Legacy Builds that can be generated from the XDK IDE. It will not work in the XDK emulator, AppPreview, or Cordova Builds. Below is the forum link where IntelJohn points this out. I have confirmed this with independent testing.
If your application will rely on any Cordova plugins (meaning you'll have to use the Cordova build) it would be better for you to drop use of the intel.xdk.facebook library and install the Cordova Facebook Plugin (https://github.com/Wizcorp/phonegap-facebook-plugin).
Respondido 31 ago 14, 19:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas facebook or haz tu propia pregunta.
We have tried and tried but all of our builds fail with the cardova plugin - w3bMak3r