I've created a Facebook application called SocialMine that allows you to explore your social network. Be sure to check it out, I created it based off of this Starter Kit.
|
|
Facebook Starter Kit App stats as of June 15, 2010
Monthly Active Users
457
Application Fans
137
Total Users
3,953
|
Currently rated 3 by 8203 people
- Currently 3/5 Stars.
- 1
- 2
- 3
- 4
- 5
(click stars to rate)

Facebook application screenshot
EditOverview
To ease Facebook development I've created a C# VS.NET 2008 Starter Kit that you can download here. This latest release of the Starter Kit is based on the Facebook Developer's Toolkit v2.1 which uses LINQ to XSD. Once you've installed the Starter Kit here is what you'll need to do:
Click here to see the app on Facebook.
Here are the basic steps you'll need to follow:
- Download the Facebook Developer Toolkit
- Download and install my Starter Kit
- Start VS.NET 2008 (2005 is not supported as FDT v2.1 requires .NET v3.5)
- Select File|New Web Site... (C# Language)|Facebook Starter Kit v2.1
- Create a new application on Facebook
- Configure your Facebook application
- Update your web.config
- Start coding!
EditRequirements
- C# language knowledge (VB.NET is not supported)
- VS.NET 2008
- .NET v3.5 (required due to FDT dependency)
EditCreate a new Application on Facebook
- Sign up for a Facebook account
- Add the Developer application to your account (if you have a Facebook account just click the link and you'll be take to the page to add the Developer app)
- Once you've installed the Developer application you can view it from the Top menu bar by selecting Settings|Application Settings and choosing the Developer application. Once you're viewing the Developer app click the Set Up New Application button or click here.

- Enter the Application Name and agree to the TOS and click Save Changes:
- On the Basic tab
- Set Help URL -> http://hosts_file_alias/<your_app_name>/help/
- Set Privacy URL -> http://hosts_file_alias/<your_app_name>/privacy/
- Set Terms of Service URL -> http://hosts_file_alias/<your_app_name>/TOS.htm
- Click Save Changes
- On the Canvas tab
- Set Canvas Page URL for your application (this may take many tries as lots of names are taken)
- Set Canvas Callback URL -> http://hosts_file_alias/<your_app_name>/
NOTE: Facebook has recently stopped supporting localhost as a valid callback URL. To workaround this problem you can add an alias to your %SystemRoot\System32\drivers\etc\hosts file that refers to localhost as suggested here.
Using localhost makes it easy for you to debug locally, note that the port number (nnnn) will be the port you use to debug your application locally using Microsoft's development web server. You can get that port number once you download and run the application below. Also according to this post these URL's should be all lowercase.
- Set Render Method to IFrame
- Set IFrame Size to Resizable
- Set Canvas Width to Full Width (760px)
- Click Save Changes
- On the Authentication tab (Optional)
- Set the Post-Remove Callback URL to http://hosts_file_alias/<your_app_name>/settings/RemoveApp.aspx
At this point, you can review the other available settings but you're pretty much ready to go.
If you would like to use
XFBML in your application be sure to take a look at
this post. Note, XFBML support has been added to an updated version of the starter kit so just download the latest and you're good to go!
EditCreating your IFRAME ASP.NET Application
Now launch VS.NET 2008 and start a new web site using the ASP.NET Starter Kit.
- Launch VS.NET 2008
- Select File|New Web Site...
- Select C# from the Language dropdown
- On the New Web Site dialog select Facebook Starter Kit listed under My Templates
- Click OK

- Open web.config and set the APIKey and secret from the values on the Facebook Settings page for your application
<appSettings>
<add key="APIKey" value=""/>
<add key="Secret" value=""/>
<add key="Callback" value="http://localhost:14215/facebookapp"/>
<add key="Suffix" value="MyIFrameApp"/>
<add key="TemplateID1" value="20889707566"/>
<add key="TemplateID2" value="20889902566"/>
</appSettings>
EditAdding your application to your Facebook account
Once you've created your application you'll want to add it to your FB sidebar so you can use it easily. To do that follow these steps:
- From the Developers Application on Facebook browse to My Applications
- Click View About Page then click Add Application
Feel free to contact me
here to let me know what you would like to see or what's missing.
NOTE: Be sure to checkout the
ASP.NET page on the Facebook Developer's wiki.
EditSee Also
My other Facebook blog posts
How to Use the Facebook Developer Toolkit 2.0
An HttpHandler for use with Facebook