Facebook, C# and ASP.NET MVC – Code samples for friends list, activities list and wall posts
A few weeks back I wrote about the official C# SDK from Facebook and provided some sample code demonstrating how to use it to get some basic information about the logged in user. Admittedly the initial sample asp.net mvc code was fairly simple in order for it to be straight forward and easy to understand. I’ve decided to expand a bit on the sample in order to demonstrate how to use the Open graph API to perform a few more interesting calls, notably:
- Post to a user’s wall
- Retrieve a list of the user’s friends
- Retrieve a list of the user’s activities
The original sample code demonstrated how to authenticate a user and make calls using both the official C# sdk and a home grown solution. I’ve kept that approach but have organized and refactored the samples a bit better to make it hopefully more clear. The new version of the sample code allows you to login/out to facebook only on the home page. Once logged in you can go to the ‘Official’ and ‘Custom’ tabs to view your friends, activities or to post a message to your wall. While the functionality is the same between the two tabs, the code behind them is different. I assume most people would use the official SDK but I provided an alternative just as a point of interest. OK, I was bored really, and just wanted to see how it could be done differently.
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 3
This is part 3 in a 3 part tutorial for creating a notes application using Silverlight and Windows Phone 7. The previous articles can be read here
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 1
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 2
Currently our application can display a list of notes, and create and save a new note. The last piece of the puzzle is to allow the user to delete an existing note. To accomplish this all we really need to do is add an application bar button to the details page, remove it from the working items list, and save it to isolated storage.
- Add the appbar.save.rest.png image in C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons to the Images folder in the project, and set it’s ‘Build Action’ to Content’, and it’s ‘Copy to Output Directory’ proerpty to ‘Copy if newer’.
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 2
This is part 2 in a 3 part tutorial for creating a notes application using Silverlight and Windows Phone 7. The other articles can be read here
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 1
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 3
In part one of the tutorial we created the project, added a new Note class to serve as our model, and added a StorageHelper class to help us manage IsolatedStorage. The next step is to add support for adding a note to the app. We’ll keep it simple and just use a button on the main page’s application bar to add a note. When a user clicks the add note button on the main page, a new Windows Phone 7 page will load, which will enable the user to enter a note title and note text. They’ll also be able to save the note, or cancel the save, which will return them to the main page.
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 1
This is part 1 in a 3 part tutorial for creating a notes application using Silverlight and Windows Phone 7. The other articles can be read here
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 2
Windows Phone 7 Tutorial – Creating a simple notes app with Silverlight Part 3
Admittedly a bouncing ball on Windows Phone 7 isn’t all that useful, so I decided to create a sample application that could do a little more than draw a ball or say ‘hello world’. Ideally I wanted to work with some of the core concepts on the phone, such as lists, navigation and the application bar. Additionally I wanted a Windows Phone 7 app that persisted it’s data, which meant working with Isolated Storage. Obviously this calls for a note-taking app…after all who doesn’t love taking notes? Notes are only second to bouncing balls in my book.
To keep the scope of the app small and focused, I wanted the note app to do only the following
- View a list of notes
- Add a note
- Delete a note
Big news day from Mix 09
Lots of news coming out of Mix 09….
ASP.NET MVC Released
Scott Guthrie recently posted a great (and free) tutorial from his upcoming book here. Not a whole lot of changes from RC2, but you’ll have to uninstall previous versions obviously. You can get the installer here. Note that some addins can cause problems during the install (notably Azure tools), but there’s a hotfix available for it.
Silverlight
Silverlight 3 beta announced : Getting started with Silverlight 3. Tim Heuer has a pretty detailed post regarding the new featuresLooks like there’s a ton of features in the works, new codecs (H.264, AAC,MPEG-4), improved graphics support (3D transform effects). hardware acceleration, and even standalone silverlight apps. Interestingly the download for the silverlight 3 install is smaller than the current silverlight 2 install.

