diff --git a/project/android/fr/hyperfiction/HypFacebook.java b/project/android/fr/hyperfiction/HypFacebook.java index 6660931..736fd33 100644 --- a/project/android/fr/hyperfiction/HypFacebook.java +++ b/project/android/fr/hyperfiction/HypFacebook.java @@ -237,13 +237,15 @@ public void graph_request( String sGraphRequest , String sKeys , String sVals , Bundle params = stringTo_bundle( sKeys , sVals ); final Request req = new Request( Session.getActiveSession( ) , sGraphRequest , params , HttpMethod.valueOf( sMethod ) , listener_request ); - _mSurface.queueEvent(new Runnable() { - @Override - public void run() { - trace( "sync request..."); - req.executeAndWait(); + GameActivity.getInstance( ).runOnUiThread( + new Runnable() { + @Override + public void run() { + trace( "sync request..."); + req.executeAndWait(); + } } - }); + ); } /** diff --git a/src/fr/hyperfiction/HypFacebook.hx b/src/fr/hyperfiction/HypFacebook.hx index 452f11e..a3b2d00 100644 --- a/src/fr/hyperfiction/HypFacebook.hx +++ b/src/fr/hyperfiction/HypFacebook.hx @@ -92,7 +92,12 @@ import nme.events.EventDispatcher; } public function connectForPublish( allowUI : Bool, permissions : Array ) : Bool { - trace("connect for publish"); + trace("************************************************************"); + trace("************************************************************"); + trace("* connect for publish *"); + trace("* DO NOT USE: http://stackoverflow.com/questions/15840893/facebook-android-sdk-session-openforpublish-not-creating-a-new-session" ); + trace("* use openForRead, then requestNew_publish_permissions *"); + trace("************************************************************"); var bSessionValid = false;