我的應用程序中有一個Facebook登錄按鈕。我如何獲得Parse將Facebook用戶保存爲解析用戶並將數據(電子郵件地址)保存到解析數據庫中?使用解析存儲和保存Facebook數據使用Swift
以下是我的Facebook按鈕的代碼。
@IBAction func didTapFacebookConnect(sender: AnyObject) {
let permissions = [ "public_profile", "email", "user_friends" ]
PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions) {
(user: PFUser?, error: NSError?) -> Void in
if let user = user {
if user.isNew {
print ("User signed up and logged in through Facebook!")
} else {
print ("User logged in through Facebook!")
}
} else {
print ("Uh oh. The user cancelled the Facebook login.")
}
可能重複的問題我在這裏回答:http://stackoverflow.com/questions/33065748/on-swift-how-to-retrive-name-and-other-data-when-login-with-facebook-and -parse/33067236#33067236 – pbush25