Search code examples
androidiphonefacebooklogoutsharekit

Facebook logout from safari but not in app in iPhone


I am using ShareKit for posting any image to Facebook.

So i am facing a problem from last few days. After authorize app from Facebook when i Logout from Safari it is not logout with in an app also. I am using Single Sign-on (SSO) functionality.

and i check the same function is working fine in Android. They also use SSO. When they logout from Facebook app so they will also logout with in an app also.

Is there any code i have to add. Pls let me know.

Thanks.


Solution

  • When using a web view on the iPhone, it does not share session cookies with the browser. Hence your WebView is isolated. This is why when you log out of Facebook in Safari, your app remains logged in. You can have the same problem in Android depending on how you launch the browser. If simply use the regular browser intent, you are basically sharing the same cookies, and hence if you log out in one, it will log out of the other one.