C# MVC Facebook application does not work in iPad Facebook application - javascript

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.

Related

Javascript Not Working on Android Default Browser

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

facebook javascript sdk login not working on iOS / best practices for mobile

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.

Iphone App - how to reproduce inapp browser actions ?

I have a problem with an IOS app that is being developed.
We agreed (with an outside development company) to develop a hybrid application : both webview and native code. My website : http://youmind.it is perfectly responsive and the functionnalities of my website work fine (imagine a feed of photos that you can like, comment and share). You can like, comment, report, share a photo from any browser on a mobile phone.
On the first tests on the app however, the functionalities on the webviews really dont work. Either something happens visually but is not registered in database, or nothing happens. The dev company tells me this is because of my website which doesnt work on the browser inapp. Problem is : they dont give me ways to test my website on such a browser, therefore no way to tests changes.
We checked that javascript was correctly enabled on the Iphone APP, and now I am totally powerless... Do you know If I can reproduce (say on a computer, or even on an Iphone), the behavior of my responsive website, in order to make tests and validate that there is a problem on the website side (and not on the appside) ?
Thanks for your help !
Martin
Note : website works with python / django. Not sure it can help.

Facebook mobile Safari not working

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.

NSURLConnection and Javascript

I'm trying to log in into a web page through an iPhone app. I'm using a NSURLConnection to try to connect. The app seems to be logging in correctly but I'm then getting redirected to a page that says I can't continue without Javascript enabled. I'm running all of this through the iPhone simulator that comes packaged with xcode. The curious part is that when I navigate to the same web page with the same information in safari in the iPhone simulator I don't get this reconnect, it sends me to the page I want.
Why is using the NSURLConnection giving me this redirect if I have Javascript enabled in the simulator and can navigate to it outside of the app? Thank you for any help.
NSURLConnection does not interpret javascript. Safari does interpret javascript. If you need it to interpret javascript use UIWebView and actually display the webpage.
Your webpage should implement "graceful degradation". Which just means your site should work without any javascript. You can find plenty of documentation about graceful degradation if you google.

Categories

Resources