iOS Facebook SDK SSO Safari log out - objective-c

I use the latest Facebook SDK in my iOS app.
It uses single sign on, so even after calling Facebook logout method, when user log in again, dialog window saying he is already logged in fine.
In other iOS applications there is a logout button on Safari web view, so user can simply log out from app.
My question is how I can implement such webView in my application?
I know that I can use FBDialog instead of Safari window to control logout process but I need to have possibility to logout exactly from Safari web view. May be the window with logout button is accessible only in the old versions of SDK?

I am also facing this problem,There is no default method to logout from facebook on safari when the app is under development,may be safari will show logout button when your app goes live on app store

Related

How to login twitter app rather than Safari web in react native?

I use react-native-simple-auth in my project but i can login twitter in web.I want to login with twitter app instead of safari view in react native. How to do this? Any Idea?
If you have installed Twitter in the phone use this:
Linking.openURL('twitter://app')
This is the snippet that open an external app. It open but you can't pass params to log in. Only open the app and, if you are logged, you will automatically enter to the app logged, else, just will open Login view.

3r Party AuthProvider - callback url redirect

My project includes the firebase sign-in methods: Twitter, Facebook, Google and Github.
I am using firebase.auth().signInWithPopup() to handle authentication and callback. It works fine when run in the browser:
in mobile, this is different. I realize that it opens a new safari window, but it does not redirect to the app home screen. How can we do that?
this is the project in the firebase console for the Facebook sign-in
I believe this is a known issue for home screen apps in iOS. The window that is opened is sandboxed from the home screen app. The popup is unable to pass back the result to the parent home screen app. Instead, you should use signInWithRedirect in that mode. I believe that should work.

Javascript Facebook sdk - captive portal on mobile devices

We are setting up a web app which serves as a wi-fi hotspot using coova chilli and the Javascript Facebook SDK.
The app has a "login with facebook" button that, once clicked, calls the FB.login() function, which opens a pop-up window where the user can insert his credentials and log in.
This solution is working correctly in desktop browsers but it's not working in mobile devices.
These are the problems I encountered:
Android device - When I connect to the wifi network, the system prompts a notification who says "Sign in to wifi network". Once clicked, the captive page opens up correctly. But when I click the fb login button, I am redirected to the url "http://m.facebook.com/v2.8/auth ..." which is correct, but then the windows freezes and I can see only a wsod.
IOS device - same as before, the cna triggers, the redirect to the fb login page works, but once I insert my credentials, the only thing I can see is a wsod.
Both issues can be bypassed by including apple.com, google.com and other domains used for auth in the hotspot walled garden, and then the user can log in to the network by using the device's browser - Safari or Chrome, it works - as pointed out in this discussion Facebook login on Apple CNA.
The thing is, we want to make it work on the "normal" workflow, that is, to make the app work correctly within the IOS captive network assistant and the Android "sign in to wi fi" functionality.
Do you have any idea how can we solve this? We searched far and wide without any success. Thank you.
EDIT
Solved by using PHP SDK instead of javascript. By generating a login link as explained here. This works also on mobile captive portal assistants such as ios and android ones because the fb login page is opened in the same window and not in popup/iframe. I hope this helps others that may encounter the same problem.

How to pass Login With Google Process in Cocoa WebView

I am developing a cocoa app for Mac OSX. It's a basic browser application and I use webview component.
In the page I want to connect, there is standard Login with Google Account button in order to login with my existing Google Account. When I clicked on this button nothing happens.
The same functionality works properly when I visited the same page by using Safari or any other browser but there is no reaction on webview component.
I've checked the action behind the Google's login button and here is the JS code.
onclick="return Dialog.Login.loginWithGoogle(false, 'https://www.mywebsite.com/-/oauth2callback', 'https://www.mywebsite.com/')"
As a part of the standard oauth process the process also has many redirections after this URL is called and normally should be completed at my site's login screen as expected. However, webview doesn't handle this.
Please note that the web site I am trying to connect in my webview is not belong to me and I have no control on it.
I checked many solutions on the web for 2 days but nothing helped.
Any help/hint will be appreciated.

How to enable iOS browser to login with facebook from web page (not app)?

I have a web site, that uses facebook to login.
I would like iOS user of safari, to be able to login into this site. You understand i'm NOT talking about a native iOS app..... just a web site visit.
Currently, user can't login from iOS safari, as they can from any desktop environement.
Either login link is inactive, or there is an error message instead of the login popup.
So what should I implement on website to have facebook login work on iOS browser ?