ios - Facebook SDK 4.4.0 logInWithReadPermissions无法在iOS 9的iPhone上使用

标签 ios facebook sdk

我在iOS上使用facebook sdk 4.4.0,并且在iOS 9上使用iphone6。logInWithReadPermissions什么都不做。也没有错误。在带有ios8。*的iPhone上,它绝对可以正常工作。非常感谢您的帮助。请帮助大家。

最佳答案

iOS 9中有一些更改,需要您做一些工作才能使Facebook SDK正常运行。 Facebook developer page包含有关如何使其与iOS 9一起使用的说明。

本质上,将SDK更新到v4.6。将此添加到应用程序的Info.plist中:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>facebook.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>                
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>fbcdn.net</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>akamaihd.net</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

和:
<key>LSApplicationQueriesSchemes</key>
<array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
</array>

关于ios - Facebook SDK 4.4.0 logInWithReadPermissions无法在iOS 9的iPhone上使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31731929/

相关文章:

ios - 使用 AVFoundation,我可以在用户按下按钮时捕获最后 5 秒吗?

Facebook 应用程序 : How to get interest-lists posts/feed?

java - 如何像 Facebook 那样为其所有用户和页面进行 URL 映射

使用 PROC_THREAD_ATTRIBUTE_PREFERRED_NODE 或 PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY 时的 CreateProcess 问题

ios - 设备重启后的 iBeacon 监控/测距

ios - 添加新行时 UITableView 停止滚动

php - jQuery Ajax 使用 multipart/form-data 提交表单元素(图像/视频)

java - 我的 Android 应用程序运行非常缓慢

sdk - 从我的网站自动登录 facebook

ios - NSSet 的 NSArray 在 NSLog 中不显示任何内容