Integrar el inicio de sesión de Facebook en Intel XDK

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");
} 

preguntado el 05 de junio de 14 a las 04:06

2 Respuestas

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

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.

https://forums.html5dev-software.intel.com/viewtopic.php?f=34&t=6444&sid=5b50fedfdfcb924a3f69579af01285c1

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

We have tried and tried but all of our builds fail with the cardova plugin - w3bMak3r

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.