Anyway, the "Microsoft.Phone.Tasks.WebBrowserTask" is exactly what I
meant. Can you get WM7 to recognize a yourapp:// URL (custom scheme)?
You could have the OAuth login flow redirect back to that page with the
oauth code (not talking about oob authorization, but the normal flow)
and get the token that way. For the user, this would probably be the
best way.
Tom
Why is it safer Tom?
Safer for who?
Cheers,
Dean
Tom
On Apr 29, 2011, at 11:50 PM, Bob12345 wrote:
> I've been using a WebBrowser control in my Window Phone application to
> login into Twitter. Today I noticed that the login/authorization page
> format had changed and it is now unusable in a web browser control
> that my application displays. The text on the page is squeezed
> together, and the page unscrollable.
I've seen a couple of reports of this concerning rendering in the current browser on Windows Phone 7. This is obviously unintended and I'm working on a fix.
On Apr 30, 2011, at 9:09 AM, Tom van der Woerdt wrote:
> It sounds like all UIWebView, WebBrowser and probably Android's WebView are blocked. This is definitely a *good* thing for security reasons.
>
> The "workaround" I recommend: launch the actual browser, using a <yourapp>:// link (something like myapplication://tokenDone) as the return URL. This is a LOT safer for the users.
Although I'm personally a strong advocate of the protocol redirects, I can assure you that we have not actively blocked access to the OAuth screens in any context or browser with these updates.
If you're having trouble with the auth screen in a web view, I'm going to need more information from you because there's no debugging tool for a UIWebView in third party apps. If you can trap any rendering or script errors from a browser view control in your development environment, please send them to me and I'll use them to look for any problems. Email me directly if you prefer.
Thanks,
Ben
/ @benward
/ Twitter platform developer
On May 3, 2011, at 5:00 PM, LoungeFlyZ wrote:
> Something has changed in the last few days and now the page is
> rendering a little "better" but scrolling/panning/zooming isnt working
> & i cant enter text in the username or password fields.
>
> Is there anything i can do to help diagnose this issue?
The update we put out this morning fixes the general rendering of the OAuth screen in WP7 (there's a couple more minor layout improvement tweaks coming as well, but the blocking problem is rectified.) It now works perfectly in Mobile IE on the phone, but for reasons which are inexplicable, loading the exact same page within a phone:WebBrowser control in an application suffers from cropped rendering and the no-scrolling behaviour described here.
Having spent a few hours in Visual Studio, and reproduced it, it appears you can work around the issue by setting IsScriptEnabled="False" on the control.
I'll continue to investigate what's causing the render bug, but the above fix should hopefully set everybody running again.
Thanks for your patience, and to Chris and Matthieu for corresponding with me on Twitter whilst debugging the issue.
Ben