How to remove the done button from the Facebook login safari view controller.
the done button is part of the SFSafariViewController and can not be removed.
Related
I implemented the login, sign-up with jetpack compose on an app. I redirected the logged-in users to the main screen and keep the new user on to the login screen. But the problem is when I redirect the user from the login screen to the main screen and the user press the back button the login screen appears. Now I know it's a normal behavior of the navigation component but I need to change it. How can I do that?
Used this line for navigating to the main screen from the login screen
navController().navigate("main_screen")
You can remove last item from the back stack before navigating to the main screen using popBackStack:
navController.popBackStack()
navController.navigate("main_screen")
I have ran into some trouble when using facebooks login framework. Logging in is fine, simple and works. My problem is when I click the FBSK logout button there is a verification (are you sure...) that pops up which stops me from using an action segue - what if the user says no, how can you ensure the segue runs only on confirmation?
So I am puzzled as to how to segue from one controller after the logout is successful because putting code in the viewDidAppear function doesn't work because the view isn't being refreshed, only the label changing from 'logout' to 'login'.
Update: Opted for #IBAction methods and used FBSDKLoginManager.logOut() to logout, however this removes the verification part and also opens the login pop-up straight away.
So I am still open to any suggestions.
The comment on your question is correct, get your view controller to conform to FBSDKLoginButtonDelegate and then control-click it to inspect the header file for your version of the SDK and what methods to implement.
Don't forget to tell your button its delegate is your view controller.
When you click on a url from a native app such as the Twitter or Facebook app, a new panel comes up to display the page. When you X out the panel, you are still in the app at the location from where you launched the url. How is this done as opposed to launching the url in an instance of Safari ?
You can use either WKWebView or SFSafariViewController
SFSafariViewController is now widely used to view websites and it looks just like Safari.app (the user can access his saved passwords/cards, and he can use reader view), the problem is that you don't have any control over it.
WKWebView is a replacement for UIWebView and you will have a better control over it but you'll have to add your own navigation and refresh buttons and title bar.
UIWebView. Here is a link to apples developer reference
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/
After implementing Facebook login with success in iOS, I need now to call the loginUI only when the user click on the login button. I do not know the right place in my code to call the openSessionWithAllowLoginUI method. I have placed it at viewDidLoad, but it calls the loginUI without user click and don't want this. Anyone?
After trying many possible solutions to handle the login button, I found the better way to do this. Had implemented my own button with the same appearance of the original button and attached the action.
My phonegap app, I want to bring back login when user logs out. But If I use,
$.changePage('#login');
after logout. It makes navigation stack unmanageable specially navigating with Android back Button . Can I reset my Navigation stack after logout.
Try using
$.mobile.navigate('#login');