在 FB.com 上删除应用程序后,FB 应用程序无法向 iOS 请求权限
我们发现一些奇怪的情况可能会导致从 iOS 应用程序共享到 Facebook 时出现错误。我试图弄清楚这是否可能只是 Facebook 响应这组事件的方式中的一个错误,或者也许有一种方法可以避免它。
基本上,当用户从 FB 网站撤销权限后,我们的 iOS 应用程序不会重新请求权限。我们预计我们的应用程序会重新询问,但它尝试共享内容,然后失败并显示一般错误消息。用户没有机会再次授予权限。
确切的情况是:
- 用户想要共享 iOS 应用程序中的内容,连接到它的 FB 应用程序请求权限,并且一切正常。
- 用户使用 FB.com 应用程序设置从其个人资料中删除应用程序。
- 用户再次从 iOS 应用程序共享内容,FB 应用程序提交但随后返回错误而不是重新请求权限。
杰里米
We found an odd set of circumstances that can cause an error when sharing to Facebook from our iOS application. I'm trying to figure out if it might just be a bug in the way Facebook responds to this set of events or maybe there's a way to avoid it.
Basically, our iOS app does not re-ask for permissions after a user has revoked permissions from the FB website. We expected our app would re-ask but instead it attempts to share content and then fails with a generic error message. There's no opportunity for the user to grant permission again.
The exact set of circumstances:
- User wants to share content from iOS app, the FB app connected to it asks for permissions, and everything works.
- User removes app from their profile with FB.com app settings.
- User shares content from iOS app again, and the FB app submits but then returns an error rather than re-ask for permissions.
Jeremy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
测试人员发现,他们没有给应用程序足够的时间来清除设备上的缓存,因此设备上的权限与 Facebook 上的权限之间存在不匹配。
此前,他们会删除 FB.com 的权限,然后立即尝试从 iOS 应用程序进行共享。现在,他们报告说,如果等待一个小时,应用程序将正常重新请求权限。
谢谢!
The testers figured out they weren't giving the app enough time to clear its cache on the device so there was a mismatch between permissions on the device and permissions on Facebook.
Previously, they would remove permissions at FB.com and then immediately try to share from the iOS app. Now, they're reporting that if they wait an hour the app will re-request permissions normally.
Thanks!
我不知道是什么原因导致您的问题,但我可能可以为您提供解决方法:在高级应用程序设置中设置取消授权回调网址。通过这种方式,您可以捕获每个取消对您的应用程序授权的用户并将其保存到您的数据库或其他任何位置。该 url 可能链接到一个 php 文件,如下所示:
I don't know what causes your problem, but I might have a work around for you: Set a deauthorize callback url in the advanced app settings. This way you can catch every user who deauthorizes your app and save it to your data base or whatever. The url might link to a php file which looks like the following: