For conflicts between two frameworks, I had to pass the facebook login code to an auxiliary class, however I'm not sure how to redirect the user to the main screen of the app once the login is done, Someone there can give me a solution to this?
@IBAction func loginFacebook(sender: AnyObject) {
let util = Util()
util.loginFacebook()
}
/*Método na classe util*/
func loginFacebook(){
let permission = ["public_profile"]
PFFacebookUtils.logInInBackgroundWithReadPermissions(permission)
let requisicao = FBSDKGraphRequest(graphPath: "me", parameters:["fields":"id, name, gender,age_range, email"])
requisicao.startWithCompletionHandler { (connection, result, error) in
if error != nil{
print(error)
}else if let resultado = result{
let dados = resultado as! NSDictionary
// redirecionar para pagina principal junto com os dados
}
}