The following is an example guide to configuring XSL and PCF for Facebook Pages in OU Campus.
Configuring XSL and PCF
- After adding a page and configuring the app in Facebook, download the sample XSL file, or configure an XSL file in OU Campus: Sample XSL File (ZIP)
The zip package includes:
- If using the sample XSL file, update the included CSS as necessary and desired, and make sure that the XPath is correct for the page to be used. For instance, the XPath included in the file is:
But the XPath might also be:
- Upload the XSL file to the XSL folder in OU Campus.
- Create the page to be used with Facebook using the New Page Wizard, or identify the page that should be published to both the website and Facebook.
- Update the existing PCF-stylesheet declaration (if using a page exclusively for Facebook) or add a new PCF-stylesheet declaration (if using a page for both the website and Facebook).
Example of Update Existing:
<?pcf-stylesheet path="/_resources/xsl/fb.xsl" extension=".fb.html" title="Facebook" ?>
Example Add Another Instruction:
<?pcf-stylesheet path="/_resources/xsl/default.xsl" extension="html" title="Web Page" ?>
<?pcf-stylesheet path="/_resources/xsl/fb.xsl" extension=".fb.html" title="Facebook" alternate="yes" ?>
This specifies that an additional page product is to be created using the fb.xsl stylesheet, with an extension of fb.html, and in Preview mode the tab title is Facebook.
- Save the changes.
- Publish the page.
- Navigate Setup > Facebook.
- Edit the added Facebook page.
- Select Choose under the Welcome URL.
- Find and select the desired page.
- Save the changes.
Example of the Page in OU Social
Note: An HTML template or page can be used as well. XSL is not required for use with OU Social.
Required Styling for Welcome URL Landing Page
When creating or modifying the landing page in OU Campus that will be the landing page on the linked Facebook Page, there are some styling requirements that must be noted.
- The landing page should not reference any external CSS. All styling must be within the designed page.
- All URLs within the page must be absolute. If the site is set up to use root relative or page relative URLs with directories and pages inheriting the settings from the site, it is advisable that the settings be changed for any OU Social pages. This can be done within the Access Settings. If this setting is not changed, the URL may be converted on publish to the inherited type. Do not use root relative or page relative URLs.
For more details on configuring the landing page, visit Facebook’s Apps page.
In addition to the required styling, there are a couple of best practices that should be included in the design of the landing page.
- The width of the page should not exceed 760px when styling for the OU Social Welcome URL landing page.
- Assets and snippets can also be used within the content area on the OU Social Welcome URL landing page as it is with the main website.