为iOS邀请Facebook上的朋友在空气中的应用朋友、空气中、iOS、Facebook

2023-09-08 14:11:31 作者:RingMyBell

我正在目前的AIR应用程序的iOS和我有一些很难试图使邀请好友按钮。我使用Facebook的动作-API 1.8.1与空气3.3和我有这样的事情在我的code:

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.

唉,我想这样做的意义是显而易见的 - 它试图用JS

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

我怎么能显示好友的选择对话框,在app发送邀请函?我以为我可以写一些的StageWebView容器,并显示它的对话框,而是是不是有一些其他的,可能是更简单的方法?

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?

推荐答案

好了,我终于在不久前发现这个线程API页面中的问题:

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

5的评论链接到我所用的东西。看来这是正是我需要的。 下一次,我只是要使用本机组件...

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...