Hi, I have been using this method of authenticating with Twitter for years now https://github.com/ebryn/twitter-titanium. I recently had probems with it getting the PIN and returning to iOS - and fixed that: https://developer.appcelerator.com/question/181846/twitter-auth-recently-stopped-working-for-me.
I now have a doozy with Android. It appears that the code can no longer be retreived since we can no longer access the html of a webview in Chrome.
The code in question is :
var pin = event.source.evalJS("document.getElementById('oauth_pin').getElementsByTagName('code')[0].innerText");I can't even seem to access the webView.html content to do it manually since all of these methods result in the following error on device:
[INFO] : I/TiWebChromeClient.console: (main) [275,78944] Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src https://abs.twimg.com https://abs-0.twimg.com". [INFO] : I/TiWebChromeClient.console: (0:) [INFO] : I/TiWebChromeClient.console: (main) [51,78995] Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src https://abs.twimg.com https://abs-0.twimg.com". [INFO] : I/TiWebChromeClient.console: (1:) [WARN] : TiWebViewBinding: (KrollRuntimeThread) [3175,82170] Timeout waiting to evaluate JSUsing a Genymotion emulator though there is no problem and it works as expected.