ios – Facebook应用程序类型:哪个人可以选择移动和网络?

在Facebook应用设置☞高级☞认证我可以选择“Web”或“本机/桌面”作为应用程序类型.信息泡沫说:

Only select Native/Desktop if you are a Native iOS or Android app,
device,or Desktop app

其实我不是那些,但我的应用程序是Native iOS应用程序以及Facebook页面选项卡.
问:应该选择哪种应用程式?

我做了一些研究,并在Facebook Android Tutorial(在故障排除)下找到以下内容:

  • App type Web vs Native/Desktop. Does it matter?: No,it does not
    matter. However it’s recommended to use the type ‘Native/Desktop’ for
    your app.

这是什么意思没关系?这对我来说没有意义.为什么我应该有选择呢?

我对SO进行了更多的研究,并在@Igy(Facebook的开发支持工程师)发现this statement

If the app’s type is set to ‘Native / Desktop’ it’s assumed you
distributed the app’s secret key with the binary,and thus the app
access token isn’t trusted (and ‘getAccessToken’ in the PHP SDK will
only work when real users log in,it can’t fall back to the app token)

最后我发现在Facebook documentation

Note: Applications that are configured as Native/Desktop apps will not
be able to make API calls that require an application access_token.

我确实需要进行API调用,需要从我的页面选项卡应用程序访问令牌,因此我的结论是选择“Web”作为应用程序类型,虽然我有一个原生的iOS应用程序使用与页面选项卡相同的应用程序ID应用程序.但是,iOS应用程序会有任何缺点吗?

解决方法

TL; DR:使用’web’,除非您将应用程序秘密放入iOS / Android二进制文件中

主要的区别(以及它说“无关紧要”的原因,同时也提出了一个建议)就是如果你选择“本机/桌面”模式,那么假定你分配了嵌入应用程序密钥的应用程序二进制文件,应用程式秘密被视为不受信任.

在此配置中,使用应用程序秘密的API调用(例如创建测试用户,代表应用程序进行API调用,例如更改应用程序设置,发布成就等)将无法正常工作.

如果您的应用程序不需要使用应用程序秘密/应用程序访问令牌,将其设置为本机/桌面会增加安全性,因为您的应用程序的攻击矢量少一个.

如果您使用代码分发应用程式密码,您必须使用该选项,否则用户可以轻松确定应用程式的秘密并劫持应用程式本身.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...