Tuesday, April 13, 2010

Facebook Developer Toolkit and Windows Phone 7? Yep, with just dash of code hacking…

Smarty Pants Coding - Using the Facebook Developer Toolkit With Windows Phone 7

“A couple of people have noticed that the Facebook Developer Toolkit doesn't work on the current release of Windows Phone 7. The primary reason is that it has a dependency on System.Windows.Browser - a library which isn't in the WP7 runtime (Silverlight isn't hosted in a browser on the phone).

I took the source from the Facebook Developer Toolkit and hacked at it until I got it to work on the phone. Here is a quick demo showing it working in the WP7 emulator:

Modifying the Silverlight Version of the Facebook Developer Toolkit
First, you'll need to download the latest release of the Facebook Developer Toolkit, extract it, and open the Facebook.Silverlight solution. Next, remove the reference to System.Windows.Browser. Then, make the following changes:

image …”

I thought this sharing of how he hacked/tweaked the Facebook Developers Toolkit to get it to work on the Windows Phone 7 pretty cool. Both in that he COULD do it, because the Facebook Developers Toolkit is open source, that it actually works on the Windows Phone 7 (which bodes really well for future code sharing/re-use on it) and finally that he took the time to share his experience, tips and code too.

 

Related Past Post XRef:
Building Facebook Applications (not clients, but hosted in Facebook apps) with Silverlight
Fishbowl – THE Windows FaceBook client?
The PDC09 Keynoted Silverlight Facebook Client is now available (as a developer preview sample and without source)

No comments: