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 applicationaccess_token
.
我确实需要进行API调用,需要从我的页面选项卡应用程序访问令牌,因此我的结论是选择“Web”作为应用程序类型,虽然我有一个原生的iOS应用程序使用与页面选项卡相同的应用程序ID应用程序.但是,iOS应用程序会有任何缺点吗?
解决方法
主要的区别(以及它说“无关紧要”的原因,同时也提出了一个建议)就是如果你选择“本机/桌面”模式,那么假定你分配了嵌入应用程序密钥的应用程序二进制文件,应用程式秘密被视为不受信任.
在此配置中,使用应用程序秘密的API调用(例如创建测试用户,代表应用程序进行API调用,例如更改应用程序设置,发布成就等)将无法正常工作.
如果您的应用程序不需要使用应用程序秘密/应用程序访问令牌,将其设置为本机/桌面会增加安全性,因为您的应用程序的攻击矢量少一个.
如果您使用代码分发应用程式密码,您必须使用该选项,否则用户可以轻松确定应用程式的秘密并劫持应用程式本身.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。