1 decade ago by Aries
Hi,
I'm having problem with playMobi.player.facebookConnect( "init" ); when testing in my device( Android ). I will get a facebook error page.
But when im test on the xdk, its works just fine.
Below if the code fragment
I'm having problem with playMobi.player.facebookConnect( "init" ); when testing in my device( Android ). I will get a facebook error page.
But when im test on the xdk, its works just fine.
Below if the code fragment
// init the game var init = function() { AppMobi.display.useViewport( 320, 480 ); document.getElementsByTagName('body')[0].style.visibility = "visible"; AppMobi.device.setRotateOrientation( "portrait" ); AppMobi.device.managePower( true, false ); AppMobi.canvas.load( "index.js" ); AppMobi.device.setAutoRotate( false ); // turn on multiTouch for Android try{ if(AppMobi.multitouch) { AppMobi.multitouch.enable(); } } catch( e ){} /************************************** appMobi Updates Checks for updates on startup and also listens for update alerts while the app is running **************************************/ updateMobi.init( true ); /************************************** statMobi Record that the game was loaded And what type of OS **************************************/ statMobi.record({ 'appevent':'deviceReady', 'query':'platform='+AppMobi.device.platform }); } /* This code is used to run as soon as appMobi activates */ var onDeviceReady = function(){ // init playmobi object playMobi.init(); // login player with their facebook account playMobi.player.facebookConnect( "init" ); }; document.addEventListener( "appMobi.device.ready", onDeviceReady, false );