简体   繁体   中英

Inviting facebook friends in Air app for iOS

I'm working currently on an Air app for iOS and i have some hard time trying to make "invite friends" button. I'm using facebook-actionscript-api 1.8.1 with air 3.3 and I have something like this in my code:

invite_button.addEventListener(MouseEvent.CLICK, facebookInvite);

private function facebookInvite(e:MouseEvent):void
{
    var dat:Object = new Object();
    dat.message = 'I invite you to this awesome app!';
    dat.title   = 'Super Extra Max Facebook App';
    dat.filters = ['app_non_users'];

    Facebook.ui('apprequest', dat);
}

Button displays only if user is logged in.

But when I tried to tap the button I got debugging error:

ExternalInterface not available on the device.

Well, I guess the meaning of this is obvious - it's trying to use JS.

How can I show friends select dialog and send invitations from within an app? I thought I can write some StageWebView container and display the dialog in it but isn't there some other, probably simpler way?

Ok, so I finally found this thread on API page in issues a while ago:

http://code.google.com/p/facebook-actionscript-api/issues/detail?id=365

5th comment links to the thing I used. It appears it is just what I needed. Next time I'm just going to use native component...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM