Twitter/Facebook in-app browser on Android not displaying my site correctly

1.6k views Asked by At

I'm wondering if anyone has any experience with getting their website to work properly within Twitter or Facebook's in-app browser on Android.

I probably don't need to get into all of the technical details about my site that aren't working correctly, but a simple example such as doing a HTML 5 geolocation call fails without any location prompt, such as one from this site:

http://html5demos.com/geo

I did some Googling, and found very little information whatsoever on the subject. Is there even any way that I can debug my app running in the in-app browser?

I'll also mention that the in-app browser seems to aggressively cache my site, so I can't even fall back on reliably doing any alert() calls to aid in debugging.

2

There are 2 answers

0
Jon Worek On

I was able to help myself after doing a little more research, and coming across a similar question that I'm unable to find at the moment.

http://jsconsole.com/ was very helpful in at least giving me some further insight into what my page was doing by being able to remotely view my console.log() calls. I definitely recommend checking it out.

I didn't find an elegant solution to getting over the caching problem. I was mostly resorting to clearing all of the Twitter app's local data. It seemed to allow to page to reload so I could test my changes.

FWIW, I discovered that geolocation and localStorage are both disabled in Twitter's in-app browser on Android. Well, to clarify, localStorage seems to not be supported, and geolocation seems to be supported, but it will fail without any sort of location prompt. I'm not sure if this is the exact site that I used: http://detectmybrowser.com/, but it (or something similar) helped with letting me know which missing feature I was blowing up on.

0
Kokizzu On

I found the similar problem can be caused by https page but loading http images. Changing both to https or // to match automatically solves this problem.