Facebook iOS SDK“出了问题”在登录可能的诊断 [英] Facebook iOS SDK "Something went wrong" at login possible diagnostic

查看:139
本文介绍了Facebook iOS SDK“出了问题”在登录可能的诊断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我已经发现为什么iOS Facebook SDK在登录时出现了错误。



我很少遇到这个问题,我正在开发的应用程序正在被其他人测试,他们总是会遇到这个错误,所以我开始想到我的帐号与他们不一样,我发现我有一个安全设置,意思是当我从设备/模拟器登录到我的帐户时,我需要输入我使用的设备名称。



在我点击登录后出现该视图,这是其他人收到错误的地方,所以我使用一个朋友的帐户登录并确定,他有问题,他的安全设置忽略保存新的设备。 / p>

所以我想知道,我认为Facebook SDK正在尝试提示用户将设备保存到他们的帐户,对于那些禁用此安全功能的用户, SDK遇到问题。



还有一点很有趣的是,这并不会阻止用户登录,因为当我尝试与Facebook分享后,我被带到我的饲料



任何想法?



解决方案

这里是我想出了一个解决方法,虽然公平的警告,这不是一个正确的解决方案。我不喜欢它,因为它非常的黑客,但它现在适用。



在显示流对话框之前,我检查用户是否登录如果没有,我显示登录对话框,然后在DidLogin回调中触发流对话框。
基本上我避免了自动登录到发布对话框转换。


I think I've discovered why the iOS Facebook SDK shows something went wrong when you login to it.

I rarely get this problem, and the app I'm developing is being tested by some other people and they are always getting this error, so I started to think what my account had different to theirs and I found that I have a security setting meaning I need to enter the device name that I'm using when I log into my account from the device / simulator.

That view appears after I tap login, and this is where other people are getting an error, so I used a friends account to log in and sure enough, he had the problem and his security settings ignore saving new devices.

So I'm wondering, I think the Facebook SDK is trying to prompt the user to save the device to their account, and for the users who have this security feature disabled, the SDK runs into problems.

Also it's interesting to note that this doesn't stop the user being logged in, because when I try to share with Facebook just after, I am taken to my feed dialog view which I wanted from the start.

Any thoughts on this ?

解决方案

Here's what I came up with as a workaround, though fair warning it isn't a proper solution. I don't really like it as it's very hacky, but it works for now.

Before showing a the stream dialog, I check to see if the user is logged in. If not, I show the login dialog and then trigger the stream dialog in the DidLogin callback. Basically I'm avoiding the automatic Login to Post Dialog transition.

这篇关于Facebook iOS SDK“出了问题”在登录可能的诊断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆