PT Social Media CCAPI Configuration

From ADF Docs
Jump to: navigation, search

Back to Build Subsites, Templates and Pages

Overview

The Social Media Application uses the ADF CCAPI to populate each of the social media service custom element records with moderation data. The CCAPI needs to be configured for the site and forums application.

First, follow the steps to set up the CCAPI Config file for the site. Once that configuration is complete, follow the steps below to set up the CCAPI config for the Photo Gallery application. Make sure to update the wsVars section with the correct URLs and username/password.

Setup

  1. Create a new page called 'ccapiSocialMedia'. Recommend creating this page in the /webadmin/socialmedia/ subsite.
  2. Add each of the following Forums elements to the page:
    1. Facebook Pages
    2. Twitter Accounts Keywords
    3. WordPress Blogs
    4. YouTube Channels
  1. For each element that was added, click on the element indicator and go to 'more...'. Select 'Name' from the menu.
  2. In the Element Name field, enter the appropriate name for each element:
    1. ccapiFacebookPages
    2. ccapiTwitterAccountsKeywords
    3. ccapiWordPressBlogs
    4. ccapiYouTubeChannels
  1. Publish this page and view in read mode.
  2. Edit the 'ccapi.cfm' file for the site and add the following xml blocks into the <elements> section:
    1. an example 'ccapi.cfm' file is in the pt_social_media > site-files > _cs_apps > config folder
<FacebookPages>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiFacebookPages</controlName>
</FacebookPages>
<TwitterAccountsKeywords>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiTwitterAccountsKeywords</controlName>
</TwitterAccountsKeywords>
<WordPressBlogs>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiWordPressBlogs</controlName>
</WordPressBlogs>
<YouTubeChannels>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>capiYouTubeChannels</controlName>
</YouTubeChannels>

To populate the <pageID> and <subsiteID> tags, view the 'source' code for the 'ccapiSocialMedia' page that was just created.

Identify the following line in the source code and enter this numeric value into the <subsiteID> tag:

     var jsSubSiteID = ##;

Identify the following line in the source code and enter this numeric value into the <pageID> tag:

     var jsPageID = ####;

Reset the ADF for the server and site.