Hi,
Is it possible to use Facebook Actionscript API in mobile air applications?
I need to log user in via FacebookMobile.login method however, when I call it, no login window appears. Am I missing something, or is it not available yet?
In login method, there is a stageRef:Stage parameter, and I pass Starling.current.nativeStage as a parameter.
Thanks in advance!
Berkay
FacebookMobile API
(4 posts) (3 voices)-
Posted 1 year ago #
-
Have you done the initialization before that?
And this is great tutorial for using Facebook API
http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.htmlPosted 1 year ago # -
Yeah I have done the initialization part. After I get a fail in initHandler, I try to log user in.
I read that article long time ago, problem shouldn't be with the API calls I guess.Posted 1 year ago # -
Here is my code and it works for me.
private var _swv:StageWebView; //......................... if(_swv==null){ _swv = new StageWebView(); _swv.stage = Starling.current.nativeStage; } _swv.viewPort = new Rectangle(0, 50, Starling.current.nativeStage.stageWidth, Starling.current.nativeStage.stageHeight-50);//for cancel fblogin button FacebookMobile.login(handleFaceBookLogin, Starling.current.nativeStage, ["publish_stream"], _swv);
Because FB login window doesn't have "Cancel" button, so I put a "Close" button for hide FB login window. But wire thing is I always got error when I'd like to change _swv.viewport or _swv.dispose() after FB return, I found out MobileLoginWindow.as method [handleLocationChange] will dispose StageWebView, I can't do anything with _swv even change _swv.viewport. so I just remark webView.dispose(); & webView=null; in [handleLocationChange], and call showWindow directly if loginWindow exist in FacebookMobile.as [login]. I'm not sure it's right or not, but at least there isn't any error happened in my project.
Posted 1 year ago #
Reply
You must log in to post.