Итак, я сделал приложение на iphone. Я использую вход через facebook и в настоящее время обновляю свой facebooksdk до последней версии. В каком-то моем коде есть ошибка. Ниже мой код:
let request = FBRequest.requestForMe()
request.startWithCompletionHandler({ (connection, result, error) -> Void in
if error == nil {
if let userData = result as? NSDictionary {
let facebookId = userData["id"] as! String
self.user.name = userData["name"]as! String
// self._fbuser.location = userData["location"]["name"] as String
self.user.gender = userData["gender"] as! String
self.user.imgUrl = NSURL(string: NSString(format: "https://graph.facebook.com/%@/picture?type=large&return_ssl_resources=1", facebookId) as String)
self.user.isFacebookUser = true
}
} else {
if let userInfo = error.userInfo {
if let type: AnyObject = userInfo["error"] {
if let msg = type["type"] as? String {
if msg == "OAuthException" { // Since the request failed, we can check if it was due to an invalid session
println("The facebook session was invalidated")
self.onLogout("")
return
}
}
}
}
println("Some other error: \(error)")
}
})
Итак, как я могу это исправить? какой код равен или похож на FBRequest.requestme?