[英]FBLoginView with Parse to “Login with Facebook”
I am using FBLoginView for my app to handle logging in with Facebook but I am also using Parse.com. 我正在使用FBLoginView为我的应用程序处理登录Facebook,但我也使用Parse.com。 I am struggling to figure out how I can create a new user in Parse if I don't login using Parse's PFFacebookUtils class.
如果我不使用Parse的PFFacebookUtils类登录,我正在努力弄清楚如何在Parse中创建新用户。 Does anyone know a good way to use FBLoginView with parse to achieve "Login with Facebook"?
有没有人知道使用FBLoginView和解析来实现“使用Facebook登录”的好方法?
Parse actually takes all the legwork out of this process by providing Facebook integration and a login view automatically for you. Parse实际上通过为您自动提供Facebook集成和登录视图来完成此过程中的所有工作。 You can use Parse's built-in Facebook login system like so:
您可以使用Parse的内置Facebook登录系统,如下所示:
[PFFacebookUtils logInWithPermissions:permissions block:^(PFUser *user, NSError *error) {
if (!user) {
NSLog(@"Uh oh. The user cancelled the Facebook login.");
} else if (user.isNew) {
NSLog(@"User signed up and logged in through Facebook!");
} else {
NSLog(@"User logged in through Facebook!");
}
}];
When do you do this, 4 things will happen: 你什么时候这样做,会发生4件事:
You can find a solid step-by-step in the documentation here: https://parse.com/docs/ios_guide#fbusers/iOS 您可以在此处的文档中找到一个可靠的步骤: https : //parse.com/docs/ios_guide#fbusers/iOS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.