IOS Parse SDK: How to check if Facebook or Twitter is registered?

I have an application that allows users to log in to Facebook or Twitter. There is one

-(void)logInViewController:(PFLogInViewController )logInController didLogInUser:(PFUser )user 

which controls login with PFLogInViewController. How to check if a user clicked on the Facebook login button or Twitter login button? I have functionality in my application that requires a different setting depending on the type of input.

+6
source share
1 answer

in logInViewController:didLogInUser: ... check this out

 BOOL linkedWithFacebook = [PFFacebookUtils isLinkedWithUser:user]; BOOL linkedWithTwitter = [PFTwitterUtils isLinkedWithUser:user]; 

If his none of the above ... his log with the "normal" username / password PARSE ...

Happy crack!

+8
source

Source: https://habr.com/ru/post/970051/


All Articles