Gurus of SO
I have a working web app which works well enough with Facebook Connect. But when I post the Web App to the Home Screen on iOS 4.3.4 & click on 'FB Login' in the app -> it triggers Safari to open up and I end up leaving the Home Screen view.
Is there anyway to login from the Home Screen app itself and not trigger Safari?
Thank you.
Tried target="_webapp", target="_blank", etc none of those worked for me.
This bit of javascript worked just fine for me:
<a href="#" onclick="window.open('<put your facebook login URL here>','_parent'); ...
It is doing this to verify the Facebook login session. Currently, you cannot avoid this since your web app must go to Facebook dialog anyway to have the user login if they haven't already.
来源:https://stackoverflow.com/questions/7381432/iphone-web-app-on-home-screen-facebook-authenticate