2016-12-06 60 views
3

你好我有在Swift與FBLogin問題 它始終顯示Facebook登錄斯威夫特3

「用戶取消登錄。」

iOS8.2

「回落到NSUserDefaults存儲,因爲模擬器錯誤的訪問令牌」

當我使用iOS10.1

你有任何有關建議,這個問題?

enter image description here

回答

5

我解決了這個問題,在我的AppDelegate.swift添加這些功能

@available(iOS 9.0, *) 
    public func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { 

     return SDKApplicationDelegate.shared.application(
      app, 
      open: url as URL!, 
      sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, 
     annotation: options[UIApplicationOpenURLOptionsKey.annotation] as Any 
     ) 
    } 

    public func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { 
     return SDKApplicationDelegate.shared.application(
      application, 
      open: url as URL!, 
      sourceApplication: sourceApplication, 
      annotation: annotation) 
} 

希望能幫助

+0

您還可以在這裏解決棄用警告https://開頭github上。 COM/Facebook的/ Facebook的SDK-斯威夫特/問題/ 35 –