The ball

Facebook, C# and ASP.NET MVC – Code samples for friends list, activities list and wall posts

August 11, 2010 by onishimura · 5 Comments
Filed under: .NET, ASP.NET MVC, Facebook 

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.

Read more

Official Facebook C# SDK Released

July 17, 2010 by onishimura · 6 Comments
Filed under: ASP.NET MVC, Facebook 

Looks like a brand new SDK to play with for facebook. While they have other sdks for python, php, javascript, etc, this is their first official C# SDK. Previously the primary SDK that was available was the Facebook Developers Toolkit, which hasn’t been updated in some time (and hasn’t been updated to support the open graph api as far as I can tell).

You can grab the code from github at http://github.com/facebook/csharp-sdk.

Read more

Facebook and ASP.NET MVC

April 13, 2009 by onishimura · 2 Comments
Filed under: Uncategorized 

One of my personal projects is a facebook application using the Facebook Developer’s Toolkit and ASP.NET WebForms. There’s a number of good guides for using the toolkit out there (Devtacular for example) and for the most part development was straightfoward. However, there were a few issues that popped up as a result of webforms particular model of execution. So, being a fan of new and shiny things, I thought it’d be interesting to try and integrate the Facebook Developer’s toolkit with the newly-released ASP.NET MVC.

Read more

Big news day from Mix 09

March 18, 2009 by onishimura · Leave a Comment
Filed under: .NET, Azure, Silverlight 

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.

Read more