Facebook support
This addon provides substantial Facebook integration for your ocPortal website.
Features:
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 127.0.0.1 via your computers 'hosts' file.
Example Comcode to use it:
'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 http://www.facebook.com/#!/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.
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).
Features:
- 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 127.0.0.1 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:
Code
[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 http://www.facebook.com/#!/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:Code
:set_value('no_finish_profile','1');
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.Requirements
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).
License
Licensed on the same terms as ocPortalAdditional 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.




Comments
WOW!
I'll update my Facebook theme with this great new add-on ASAP. Glad to learn that ocPortal intends to develop even more integration with Facebook in a near future.
I am having a few minor troubles with it though. It may be because I am using 5.1 beta?
When I login with facebook and then logout I am directed to fill out the info to finish connecting. When I do this it creates a new account instead of connecting accounts.
When logged in with fb I don not show on the users online list, show as a guest.
After a user logs in with facebook, logs out (both fb and my site) and tries to log in again with the regular log in method this erroe is shown.
Internal error - an unknown authentication scheme was found in the database against your member. Unfortunately we cannot authenticate you.
And there is also this…. Making registration simple and social in just a few steps - Facebook Developers
The addon has now been updated:
The "unknown authentication" error is correct (the account), but in the next ocPortal we'll make it look a bit less scary and be more helpful.
The addon doesn't connect accounts, it is designed to make a new account. Hopefully the new changes streamline this though. ocPortal has an account merge feature the admin can use if this matters a lot to people, although it's a manual task.
FOOTER.tpl has changed again to accomodate this.
Will this work on 6.1 Beta?
.app_content_51546247891 a.uiLinkSubtle { display: none; }
.app_content_51546247891 a.UIImageBlock_ICON_Image { display: none; }
#bootloader_Zvucx { height: 42px; }
(For v6 I intend to reupload all the non-bundled ocProducts addons, there have been some little bug fixes across a few of them since we originally released them.)
No redirect
I have installed the Facebook addon on a clean install of OCPORTAL and when I click on LOG ON, I get to the facebook page, I autorise everything ok, and then it dissapears, and I dont get registered on the site