简体   繁体   English

如果用户取消Facebook登录,如何返回应用程序?

[英]How to return to app if user cancel Facebook Login?

I m working on facebook login. 我正在登录facebook登录。 Everything is fine, when I tap on the login button it will take me to safari (or FB app) and ask me for FB login. 一切都很好,当我点击登录按钮时,它将带我去safari(或FB应用程序)并要求我登录FB。

my question is how to make safari return to my app if I decide not to login and hit cancel button? 我的问题是如果我决定不登录并按下取消按钮,如何让safari返回我的应用程序? its currently taking me to my facebook main page after hitting cancel and is not useful 它目前带我到我的Facebook主页点击取消后没用

thanks in advance! 提前致谢!

I don't know how to do it exactly as you suggest but what you could do is create another view controller with a web view inside of it, and a navigation bar at the top that has a cancel button on it. 我不知道如何完全按照你的建议去做,但你可以做的是创建另一个视图控制器,里面有一个Web视图,顶部有一个取消按钮的导航栏。 This way they could log on to facebook from within the app, so they don't have to switch between things which can be a little lengthy! 通过这种方式,他们可以从应用程序内部登录到Facebook,因此他们无需在可能有点冗长的事物之间切换! It would also allow an easy cancel button with 'dismissModalViewController' or whatever it has changed to in iOS6. 它还允许使用'dismissModalViewController'或iOS6中已更改的任何内容轻松取消按钮。 I believe this should work :) 我相信这应该工作:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM