Skip to content

Instantly share code, notes, and snippets.

@danielwrobert
Created September 27, 2013 17:19
Show Gist options
  • Save danielwrobert/6731945 to your computer and use it in GitHub Desktop.
Save danielwrobert/6731945 to your computer and use it in GitHub Desktop.
Notes on setting up a custom Facebook app and installing it as a tab. For Pages only, not for Profiles (as far as I know).

Facebook App & Tab Installation

Create Hosted HTML/CSS/JS Application

  • Develop your app in a max-width 810px container
  • Upload to hosting. If this is a Django project, you can install django-fbapps and create new fbapp. -- To install django-fbapps, follow instructions on Readme.rst file. Additionally, be sure to properly configure path in global urls.py as well as the app-specific urls.py.

Install App in Facebook Developer Admin

  • Create New App -- *If you have not installed any prior applications, you will first need to install the Facebook Developer App
  • Fill in data for 'Basic Info', 'App on Facebook' and 'Page Tab' sections

Initialize JavaScript SDK

  • Add the JavaScript SDK initialization code to your app just below the opening body tag.
  • If you are using a CSS reset and you are noticing obnoxious horizontal scrollbars, be sure to specify 'overflow-y: auto;' in your app's CSS as an override.

Facebook Login

If you need your users to log in to your app or website, you can utilize the Facebook's OAuth dialog feature. This isn't a required step and won't be necessary if you are just planning to create a basic informational tab. It is definitely useful to know, however, as there are many cases in which you would want to take advantage of this functionality.

Install Tab on Facebook Page

This part was a little tricky. There wasn't an obvious way to install as a tab from the Facebook Developer Admin, as one would likely expect. Instead I did a bit of searching and found this Page Tab Tutorial in the docs.

Check Documentation

Facebook seems to change it's API relatively often. Be sure to check the documentation to ensure that you are taking the current approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment