Facebook App Invites打开SafariViewController而不是Native应用程序

Edu*_*lho 2 facebook unity-game-engine ios facebook-ios-sdk ios9

我正在尝试从Facebook 实施App Invites功能,我想让我的用户重定向到Native Facebook应用程序(如果安装在用户的设备上).

但是,虽然Facebook Native应用程序安装在设备上但它从未打开过,但"Invite Dialog"总是在一个SafariViewController相反的位置打开(参见下面的附图).这是不希望的,因为大多数时候用户没有登录Safari并且放弃完成"邀请"任务.

以下是我用来构建应用程序的SDK版本:

  • iOS:9.0
  • Facebook iOS SDK:4.6.0
  • Facebook Unity SDK:7.1.0

我已经阅读了为iOS9准备应用程序,并已使用所有可能的URL方案填充了我的Info.plist:

<key>LSApplicationQueriesSchemes</key> <array> <string></string> <string>http</string> <string>https</string> <string>mailto</string> <string>fb</string> <string>fbapi</string> <string>fb-messenger-api</string> <string>fbauth2</string> <string>fbshareextension</string> <string>fbapi20130214</string> <string>fbapi20130410</string> <string>fbapi20130702</string> <string>fbapi20131010</string> <string>fbapi20131219</string> <string>fbapi20140410</string> <string>fbapi20140116</string> <string>fbapi20150313</string> <string>fbapi20150629</string> <string>fbauth</string> <string>fb-messenger-api20140430</string> <string>fb-messenger-platform-20150128</string> <string>fb-messenger-platform-20150218</string> <string>fb-messenger-platform-20150305</string> </array>

尽管如此,SafariViewController它总是打开而不是Facebook Native App.

如何让我的应用程序用户使用Native Facebook应用程序使用"App Invite"对话框?

App邀请在SafariViewController中

Fra*_*ina 5

看起来这是由Facebook设计的,显然Facebook选择使用SafariViewController避免要求许可几次切换应用程序.您可以在此查看常见问题解答

常问问题

为什么在调用对话框时会看到"想要打开Facebook"警告对话框?

在iOS 9中,应用程序开关可以通过确认对话框提示用户.SDK将尝试通过选择最佳对话框(例如SafariViewController)来最小化频率,但这是在iOS 9中设计的.