Facebook v1.1 Install

From ADF Docs
Jump to: navigation, search

Download

Download the Facebook Application from the Community Site or from the SVN Repository.

Extract the zip file into your /ADF/apps/ folder. A subfolder called facebook will be created and will include all the code and the custom elements ready to be imported from the /ADF/apps/facebook/exported-objects/ folder.

Site Configuration

The Facebook Application is built within the ADF. The ADF must be installed in the site to run the Facebook App, follow the ADF Installation instructions.

Steps

  • Make sure the ADF is setup and running on the site. If the ADF is not setup, then follow the instructions for ADF Installation.
  • Open the site's 'ADF.cfc' (See Site Configuration (ADF.cfc) for more info) file (located in your site's /_cs_apps/ directory) in a text editor. Locate the Load the ADF Application into application space comment in the file. Add (or uncomment) the following command under the comment section:
loadApp("facebook");

Import Custom Elements

The Facebook Application has several Custom Components defined within CommonSpot. The components have been exported and are available in the app's "exported-objects" folder located at the root of the Facebook application directory (e.g. /ADF/apps/facebook/exported-objects/).

Optional: You may want to create a new category within the CommonSpot Element Gallery for 'Facebook Elements'.

To import these objects, you will need to be an administrator for your site. If you are not a site administrator, consult your Server administrator for more information.

Import

Follow these steps to import the Custom Elements:

  1. Go to your site's admin.cfm (CommonSpot's Site Administrator).
  2. Expand the 'Elements & Forms' tab and click on 'Elements'.
  3. In the Manage Elements screen click on 'Manage Categories'.
  4. Now click the 'Add New Category' link and create a 'Facebook Elements' category.
  5. Close the 'Manage Element Categories' screen.
  6. Back in the 'Manage Elements' screen click on the 'Import Custom Element' link.
  7. Now click on 'Browse...' and go to the /ADF/apps/facebook/exported-objects/ folder
  8. Click on one of the ZIP files to import that custom element.
  9. Be sure to choose your new 'Facebook Elements' category
  10. Click Next.
  11. Repeat steps 7-10 for other custom elements in the exported-objects folder.

Now you can import the Custom Fields:

  1. Go to your site's admin.cfm (CommonSpot's Site Administrator)
  2. Expand the 'Elements & Forms' tab and click on 'Field Types and Masks'
  3. In the Field Types and Masks screen click on 'Import Custom Field Type'
  4. Now click on 'Browse...' and go to the /ADF/apps/facebook/exported-objects/
  5. Click on the zip file that's name starts with 'Post-to-Facebook-Page-Custom-Field-Type-…"
  6. Click Next.

Verify Imports

The imported components' render handlers must be verified. During the import process, the render handler paths may have been changed to reflect the current site's path.

Review and update these paths to reference the ADF path. In most cases, this will just require to be unlocked and a change in the path from the site name to 'ADF'.

App Configuration

The Facebook App uses an XML file to store site specific configurations. The Facebook App needs to know your Facebook application's Application ID and Application Secret.

Configuration Fields

If you haven't created a Facebook app, go to this page for more details. Read that page and hit this link to register your Facebook application.

Don't worry you will not have to write a single line of code to use Facebooks API's, we just need to add those values to the configuration XML file in any text editor (like Notepad).

There are two components in the configuration XML file (/ADF/apps/facebook/), both can be found on your Facebook app's properties on this page:

  1. appID - Listed as Application ID.
  2. appSecret - Listed as Application Secret.

Final Step

Once your configuration XML file (facebook.xml) has been updated with the correct values, move the XML file to the /cs_apps/config/ folder. Reset the ADF for the server and site.