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 - – you can find this xml underneath the properties folder in your project

    This will probably get you going … have fun

  • No comments: