Facebook Bugs - Help Vote

Setup Guide

Links in this section:


Development Choices

  • Internet Accessible Dev Server
  • Local Development (Full debugger support)

Setup Procedure

Internet Accessible Web Server Based Development

  1. Ensure .NET 4.0 is installed on the server
  2. Create a new Web Site on your server
    1. If under IIS6 - in the Website Properties dialog, click ASP.NET tab and ensure the ASP.NET version is set to 4.0.30319
    2. If under IIS7 - make sure the .NET Framework Version of the Application Pool associated with the web site is set to .NET Framework v4.0.30319
  3. Note the Base Url that you use to access the website i.e. ( http://www.sharetrift.com )
  • If running under IIS6, you will have to do some configuration to allow ASP.NET MVC to take advantage of Extension-less URLs.
    • Phil Haack has documented how to do this, the Wildcard mapping approach works (although there is performance penalty)
      • Be sure to map to the .NET 4 aspnet_iaspi.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll instead of the v2.0.50727 one in Haack's directions:

Local Development (Using Visual Studio Development Server)

  1. Specify the port to use when debugging in the project file: ( FaceSharp.MVC ->(Right Click -> Properties ) -> Web -> Servers -> <<Canvas Page URL>>
  2. Specify the start URL in the project file: ( FaceSharp.MVC ->(Right Click -> Properties ) -> Web -> Start Action-> Start URL -> Specific Port <<desired port number>>
  3. Note the Base URL you will use will be localhost:<<desired port number>>

Facebook Settings

Before you start, note the following:
  • Application Name (i.e. Share Thrift)
  • Canvas Page URL (i.e. http://apps.facebook.com/sharethrift)
  • Base URL (i.e. http://www.sharethrift.com/)

Create a Facebook Application

Create a new Facebook application.
  1. Essential Information
    1. Application Name : <<Application Name>>
    2. Terms : Agree
    3. Click Create Application - You will be taken directly to the Facebook application settings screen

Configure the Facebook Application

There are multiple tabs to the Facebook applications settings screen, the following walks you through the recommended settings in each.
Hint: When switching between tabs you don't have to hit Save Changes each time, just once after all settings are completed.
  1. About
    1. Basic Information
      1. Application Name : <<Application Name>>
    2. Developers
      1. Privacy URL : http://apps.facebook.com/<<Canvas Page URL>>/Default/Privacy/
  2. Web Site
    1. Core Settings
      1. Note the Application ID and Application Secret these will be used in the Web.config file later on.
      2. Site URL : <<Base URL>>
  3. Facebook Integration
    1. Canvas
      1. Canvas Page : http://apps.facebook.com/<<Canvas Page URL>>
      2. Canvas URL : <<Base URL>>/facebookapp/
      3. Canvas Type : IFrame
      4. IFrame Size : Auto-resize
      5. Bookmark URL : http://apps.facebook.com/<<Canvas Page URL>>/Default/Bookmark/
    2. Discovery
      1. Social Discovery : Enabled
    3. Page Tabs
      1. Tab Name : PageTab
      2. Page Tab Type : IFrame
      3. Tab URL : PageTab/
      4. Edit URL : http://apps.facebook.com/<<Canvas Page URL>>/Administration/Edit
  4. Mobile
    1. Core Settings :
      1. Application Type : HTML 5 / mobile web
  5. Advanced
    1. Authentication -
      1. Deauthorize Callback : <<Base URL>>/facebookapp/Authentication/RemoveCallback/
      2. Sandbox Mode : Disable
    2. Migrations
        1. Stream post URL security
        2. Canvas Session Parameter (Deprecated)

Database Configuration

  • Create a SQL Server database and enable the service broker by running the following SQL Statement (be sure to chagne Database Name to the name of your database.
    • The Service Broker is recommended, but not required. SQL Azure does not support the broker, in the event that you want to disable this functionality set the EnableSqlDependency AppSetting to False

  • Create a user table
USE [ShareThrift]

/****** Object:  Table [dbo].[AppUser]    Script Date: 08/19/2010 02:07:18 ******/


CREATE TABLE [dbo].[AppUser](
	[Id] [bigint] NOT NULL,
	[DateAdded] [datetime] NULL,
	[IsInstalled] [bit] NULL,
	[Id] ASC


ALTER TABLE [dbo].[AppUser] ADD  CONSTRAINT [DF_AppUser_DateAdded]  DEFAULT (getdate()) FOR [DateAdded]

Configuration File Settings

  1. Open the Web.config file
    1. Locate the ConnectionStrings section
      1. Set the DBConnectionString value to allow connecting to the database created in the previous step.
    2. Find the AppSettings section
      1. Set the ApplicationId value to the Application ID (Found under the Basic Tab in Application Settings for your Facebook Application listed under Essential Information)
      2. Set the ApplicationURL value to http://apps.facebook.com/<<Canvas Page URL>>/
      3. Set the ApplicationSecret value to the Secret (Found under the Basic Tab in Application Settings for your Facebook Application listed under Essential Information)

Test the Settings / Deploy the Website

  1. Open the solution in Visual Studio 2010
  2. Go to Build --> Publish FaceSharp.MVC
    1. Choose the appropriate location where your web is set up with IIS (Choose Appropriate Publish method)
    2. Click Publish - (The publish process ensures only the files required to run the application are included)
  3. Browse to the site, by visiting your newly created Facebook Application:
    1. http://apps.facebook.com/<<Canvas Page URL>>/
  4. It should look identical to http://apps.facebook.com/sharethrift/

Last edited Mar 9, 2011 at 6:49 PM by simnova, version 14


No comments yet.