Monday, January 10, 2011

Porting oAuth with Silverlight for Windows Phone 7 to RTM version

Recently I stumbled upon this interesting blog post Windows Phone 7 with Twitter which showed how to use oAuth on Windows Phone 7 but it was unfortunately built with the beta versions of Windows Phone 7. As an exercise I decided to upgrade the code to get it to work with the RTM release.

Some things which needed fixing or which bugged me during the upgrade

  • You will need to remove references to Microsoft.Phone.Controls, Microsoft.Phone.Controls.Navigation, Microsoft.Phone.Controls.WebBrowser, Microsoft.Controls.WebBrowser.interop. Don’t forget to to change the namespace declarations in the XAML files as well.
  • Add a reference to Microsoft.Phone assembly – all the previous dll’s have been combined into one dll.
  • Be carefull about some changes in the APIs - WebBrowser is now a sealed class. You cannot inherit from it. IsScriptEnabled, Source, and Base are now dependency properties. NavigatedEventArgs change to NavigationEventArgs.

  • Changes have been made to WMAppManifest.xml - http://10rem.net/blog/2010/09/16/announcing-the-windows-phone-7-release-wp7-silverlight-toolkit-and-xna-40 – you can find this xml underneath the properties folder in your project

    This will probably get you going … have fun

  • No comments: