使用Facebook解析登录名不起作用 [英] Parse login with Facebook does not work
问题描述
我最近在Facebook上实现了Parse登录.我基本上按照所有说明设置了Facebook SDK和Parse SDK.因此,这是应用抛出异常的部分:
I recently implemented Parse login with facebook. I basically followed all the instructions to set up Facebook SDK and Parse SDK. So here is the part where the App throws out an exception:
NSArray * permissionArray = @ [@"public_profile",@"email"]; [PFFacebookUtils logInWithPermissions:permissionArray块:^(PFUser * user,NSError * error){
NSArray *permissionArray=@[@"public_profile", @"email"]; [PFFacebookUtils logInWithPermissions:permissionArray 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!");
}
我在登录屏幕中看到的消息是:哦,用户取消了Facebook登录.因此,我假设未创建Facebook会话,并且未返回任何用户.有趣的是,我在iPhone 4上测试了此应用程序,并且登录正常.我现在正在iPhone 5上进行测试,这是引发异常的时候.在实际设备上是否需要任何正确的设置?有什么办法可以确定造成此问题的原因吗?
The message that I am getting in the log screen is : "Uh oh. The user cancelled the Facebook login." so I assume that the Facebook session was not created and no user was returned. The interesting part here is that I tested this app on the iPhone 4 and the login worked. I am testing on iPhone 5 right now and this is when the exception gets thrown. Are there any settings that need to be right on the actual device? Is there a way I could triangulate the reasons for this issue?
任何帮助将不胜感激.谢谢
Any help is greatly appreciated. Thank you
推荐答案
请确保它位于按钮中,而不是ViewDidLoad中(或尝试延迟代码)
Make sure it's in a button rather than ViewDidLoad, (or try to delay the code)
这篇关于使用Facebook解析登录名不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!