使用Facebook解析登录名不起作用

编程入门 行业动态 更新时间:2024-10-26 22:20:04
本文介绍了使用Facebook解析登录名不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近在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解析登录名不起作用

本文发布于:2023-10-27 02:46:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532076.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:登录名   不起作用   Facebook

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!