HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

Facebook support

This addon provides substantial Facebook integration for your ocPortal website.

  • User's can log in to your site using their Facebook profile (for OCF-sites only)
  • Links to the Facebook profiles of ocPortal profiles logged in via Facebook Connect
  • New Facebook Friends block (allows users to like your site and shows those that have)
  • New Facebook Site activity feed block
  • New Facebook Facepile block (shows people who like your site or have signed in using Facebook)
  • New Facebook 'Like button' block (linked into the main_screen_actions block by default)
  • New Facebook Comments block

For this addon to work you need to configure ocPortal's Facebook configuration settings, which includes getting a Facebook app ID.

Please be aware that this addon overrides some common templates to add Facebook functionality to them. In particular, the FOOTER.tpl template is overridden (will not be in the ocPortal v6 version of this addon). You will likely have overridden this yourself and need to grab the new Facebook coding added near the bottom of this template and put it into your own version.

To use the Facebook login support your Facebook app needs to be told the domain name you are using. This is for security reasons and because it saves login cookies to this domain. It can't be a domain like 'localhost' or 'mycomputer', so if you are testing on a local computer you will need to create an imaginary domain name and link it into via your computers 'hosts' file.

How to use the Facebook friends block

The Facebook friends block adds a list of your facebook fans to your website.
Example Comcode to use it:


[block stream="1" fans="10" logobar="1" fan_profile_id="80430912569" show_fanpage_link="1" fanpage_name="ocPortal Fans"]main_facebook_friends[/block]

'stream' is either "1" or "0" – 1 is you would like the stream to display, 0 means you don't.

'fans' is the number of fans you want the block to display.

'fan_profile_id' is the Fan Page ID in Facebook to find this you need to goto the fan page you want to take the data from the URL will be something like!/pages/ocPortal/80430912569 you need the number at the end "80430912569" in this section.

'show_fanpage_link' is either "1" or "0" – 1 is you would like to display a link to the ban page, 0 means you don't.

'fanpage_name' is the name you want to display on the link to the page.

'logobar' is either "1" or "0" – 1 is you would like to display a facebook logo on within the block, 0 means you don't.

Facebook Connect logins

If you want Facebook to connect instantly, without the 'complete profile' step (to complete required CPF's, the email address, the date of birth, etc), type this into OcCLE:



Compatibility with OpenID addon

Our OpenID addon overrides some of the same files as this addon. However, as long as the OpenID one is installed first, it should work fine. The Facebook addon bundles the OpenID in the shared overrides but only activates it if the OpenID addon is installed.


Facebook Connect logins only work if OCF is being used.

The addon (due to FBML) is not true XHTML compatible (but don't worry, it likely is not – ocPortal only turns it on for programmers for compatibility testing).


Licensed on the same terms as ocPortal

Additional information

Planned changes:
  • ocPortal already contains support for syndicating site news and calendar events to a centrally-defined Facebook profile - this may be removed out into just this addon in the future
  • In the future we hope to put support for an activities log and microblogging into the core of ocPortal, and then extend this addon with support for syndicating it all to Facebook.