我已经使用Facebook SDK for swift通过facebook实现了登录.它在iOS 10.3上按预期工作,但在iOS 11上显示并显示其他弹出窗口,要求用户允许通过facebook.com登录.
这会在登录过程中再添加一个步骤,从而减慢登录过程.有没有办法如何配置应用程序默认允许这样,从而删除恼人的弹出窗口?
我正在使用通过可可豆荚添加的facebook-sdk-swift 0.2.0(FBSDK版本为4.26.0).
配置在info.plist:
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>
<key>FacebookDisplayName</key>
<string>XXXXX</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>facebook</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fbxxxxxxxxxxxxxxx</string>
</array>
</dict>
</array>
Run Code Online (Sandbox Code Playgroud)
代码AppDelegate:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: …Run Code Online (Sandbox Code Playgroud) 我正在使用xcode 9和以前的代码之一进行项目开发,并给出警告说该代码已被弃用,并且不会触发该操作。该代码如下。我该如何克服呢?
@IBAction func shareOnFacebookButtonPressed(_ sender: Any) {
let shareToFacebook : SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
shareToFacebook.add(UIImage(named:"pureLightSocial"))
self.present(shareToFacebook, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)