I have implemented Facebook Connect SSO to my website at http://pocketly.com/login and it seems to work across all Desktop browsers. But for some reason it does not work on my iPhone, I have tried with both Mobile Safari and Mobile Chrome and all it does is open up the Facebook auth page and then dies. The first time i log in on the browser it authenticates correctly then closes the window which in turn goes back to my website, but it doesn't seem like the callback is being called. Every other time i try to call it it just dies on Facebook website with a white screen. I am using the Javascript SDK with the FB.login function. I don't know what else to do or how to debug it, i have even tried the web inspector on the new ios6 mobile safari. If any one has any suggestions please let me know, if you would like to see some code examples or know more information i would be happy to share. Also i did some research and here are some similar questions with no answers:
Facebook JS SDK Not Working On Safari
Facebook JS SDK not loading on Safari Mobile (using iPad)
Facebook FB.login works in Safari, but not mobile Safari
It turns out that the JS SDK seems to have a problem on mobile safari, i ran across this problem on other sites as well. What i ended up doing was using the PHP SDK which involves a redirect instead of the windows trying to communicate. It turns out this approach is way easier. Anyone else with issues with the JS SDK should try the PHP one first.
Related
I am working on a web site that is served via a Mikrotik Router.
It's a site to provision internet for users up to 100m away.
When you connect to our Wifi, a sign in page is supposed to pop up where you enter your credentials to authenticate and use our internet.
For some weird reasons whenever the user tries to sign in, for android users the Android OS keeps on presenting their default browser to sign in on the Network. Unfortunately, it appears that the Javascript is not running on the native default Browser that popped.
I am not using any ES6+ features so I'm currently lost at what could be wrong.
When I previewed the Site on Google Chrome/Opera Mini and Phoenix Browser, the javascript is working very well.
I added this tag before the closing tag of my head element:
<noscript>
<div>
We're sorry but our site <strong>requires</strong> JavaScript to work.We recommend you use Google Chrome.
</div>
</noscript>
to be displayed if Javascript is disabled, but it is not even displaying.
I tried inspecting with Google Chrome devices inspection but it seems Google Chrome devices inspection only works with Google Chrome Mobile Browser(I might be wrong).
Any insight to fix this would be really appreciated.
Thank you.
I think you need to set setDomStorageEnabled(true)
for the webview settings.
You can read more about webview here:
http://tutorials.jenkov.com/android/android-web-apps-using-android-webview.html
I'm trying to allow a user to login to my webapp via facebook login using the javascript SDK. It works on desktop (safari and chrome), however the pop up fails on both safari and chrome on iOS.
The error is straight forward to chrome where the browser and OS are not supported. This issue has a work around described here. It is less clear what the issue is with safari and not seeing the pop up. The login call is called on a button click so I don't believe the browser should block it. I also tried allowing pop ups as suggested here but that solution did not work nor is it a viable long term solution to force users to change that setting.
How do folks use facebook login in production and expect it to work on mobile? Do you need to use the manual fb login? It appears that the javascript SDK doesn't work well with mobile browsers and OS's.
This is common issue among mobile browsers and you will find that it would also be in some android devices.
For precaution it is under best practice to build flow of login manually.
Go here as your link.
So yes, you will need to go with manual integration. But, it will be full-proof integration without doubts.
I just want to ask is there a chance to open url in safari instead of facebook in-app browser with javascript or HTML?
The problem is that I need to open it from either Facebook time line or by clicking link inside in-app browser. I have found some solutions here over stackoverflow, but none of them worked. Maybe you have any suggestions how to do that?
Because I saw that there was some changes over iOS 8, so maybe there is a new way to work around
Unfortunately iOS Safari app doesn't have a URL scheme that you could use to open your links from different app like FB.
You can make it work for a different browser app though, like Chrome. See
http://www.labnol.org/internet/open-in-chrome-bookmarklet/21526/
I am developing a standalone web app that installs on iphone homescreen.
It has a calendar function that the user can download an *.ics file directly into the iphone.
However, that cannot be done from within the standalone web app, so I have a punch out url to mobile safari so that it will work.
All that works fine...
However, after the ics file is loaded into the calendar and closed, it returns to the mobile safari page where I in turn close that by using onclick='self.close()'. That works fine too...
After that page closes I want to then launch back into standalone app so the user is returned to where they were...
How do I launch my own web app from a mobile safari javascript code?
All the searching shows me how to go from standalone to mobile safari,...I want mobile safari to standalone.
I have seen the windows.location="myapp://myparam" but cannot find proper syntax to get it to work.
What is the syntax for this?
Any other solution is well received too...will need to find Android solution too, but it is not as crucial...
Thanks
I've written a Facebook application using Microsoft's ASP.NET MVC template. Works great from the browser on IE, Android's browser and will even work in Safari.
Inside the Android Facebook application clicking on the link to my application bounces you out to the web browser and everything is good to go. On an iPhone or iPad going to my application works fine from inside Safari. But if you run the iPhone or iPad Facebook application you get an error. Across the top it says 'Error' and the details say "An error occurred. Please try again later."
I've search the SDK docs and googled around but I've not found anything that tells me what to do. Did I miss a setting for my application? Is there some special cookie I need? Do I need to go leave my wallet at Steve Job's grave?
Any help would be appreciated.