Facebook Application Starter Kit
Starter Kit created by Steve Trefethen
http://www.stevetrefethen.com/blog/
Updated:
June 2, 2008
Welcome to your new ASP.NET Facebook Application. Follow the steps below
to use this project to build your own Facebook application.
Revision History:
0.7
- Updated to Facebook Developer's ToolKit v1.7
- Updated FBService references to FacebookAPI
0.6
- Updated Default.aspx and Site.Master to use CanvasIframe base classes.
- Added P3P header fix for Internet Explorer
- These changes appear to fix this error regarding Invalid Parameter errors.
0.5
- Updated to v1.6 of Facebook Developer Toolkit
0.4
- Updated to v1.5 of Facebook Developer Toolkit
0.3
- Corrected broken contentplaceholder references
- Fixed Add App and Remove App URLs below
0.2
- Moved Appkey/Secret into Web.config
- Added example of fetching friends list
- Cleaned up Default.aspx/Default.aspx.cs
0.1
- Initial Release
PLEASE READ
NOTE: These steps assume you already have a Facebook account, if not you should
create one now. Many of the links
below will not work unless you have an FB account. Also note, this application
does not include the
Facebook Developer Toolkit assembly (Facebook.dll) and you'll
need to
download and install it separately (you should do that now). You will also
need to add a reference to that assembly once installed.
Setting up your application on Facebook
- Add the Developer
application to your account (you need an account for that link to work)
- Click Developer application
from the left column and select click
Set Up New Application
- Enter the Application Name and expand Optional Fields
- Under Base Options
- Callback URL -> http://localhost:nnnn/MyFBApp/
Using localhost makes it easy for you to debug locally. Trailing backslash is significant.
- Select "Use iframe"
- Click Yes for "Can your application be added on FaceBook"
- Set TOS URL -> http://localhost:nnnn/MyFBApp/TOS.htm
- Under Installation Options
- Check "Developer Mode"
- Post-Add URL -> http://localhost:nnnn/MyApp/settings/AppAdd.aspx
- Fill in your application description
- Post-Remove URL -> http://localhost:nnnn/MyApp/settings/RemoteAdd.aspx
- Site Nav -> http://apps.facebook.com/{appname} basically, use the same URL from
Canvas Page URL (see Optional Fields)
- Edit URL -> your Canvas Page URL + /settings
Accessing your application on Facebook
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:
- Click Save then from the Developers Application browse to
My Applications
- Click View About Page then click Add Application
Configuring your application
The Facebook Developer platform requires both an APPKEY and a SECRET key that are
used for authentication. You need to follow these steps to set up the property variables.
- Open web.config and in the appsettings section set the Appkey and Secret
with the values from your application's Edit page on Facebook.
- Fire up the browser and hit your http://apps.facebook.com/{appname};
and you're off!