dominoGuru.com
Your Development & Design Resource
Adding Facebook Like to my IBM Lotus Notes Domino Custom Blog
05/21/2010 03:44 PM by Chris Toohey
Via simple Formula and a well-documented (and simple) process, I recently added the Facebook Like button to all posts on the IBM Lotus Notes Domino Custom Template that runs this site!
The idea is simple: add a simple IFRAME Element to each post footer, which communicates with the Facebook Like API and passes it the permalink URL for the given post. There's even a markup-builder online form that will get you started!
The most difficult part of implementing the Facebook Like across the various
blogging platforms that I've seen is that you need to include the post URL
permalink in the IFRAME Element src
Parameter. For those
of you using IBM Lotus Notes Domino (especially with your own custom
templates -- like me) that's pretty simple!
The post content displayed on the main page of this site as well as across the various pages that contain the specific categories are all driven off of View Design Elements and each post from a NotesDocument.
So, to implement the IFRAME Element-based Facebook Like per post, I use the following Formula:
basehref := "http://www.dominoguru.com/";
url := basehref + "pages/" + permalink;
...
"<div class=\"fblike\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=" + url +
"&layout=standard&show_faces=false&width=450&action=like&
font=verdana&colorscheme=light&height=35\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden;
width:450px; height:35px;\"
allowTransparency=\"true\"></iframe></div>"
The result? The Facebook Like IFRAME Element -- complete with the individual post URL -- is positioned in the footer of each entry:
When I get around to re-designing this site in XPages, I'll most likely go the Custom Control route which would simplify this whole process, not to mention streamline the NotesDatabase (reduction in View Design Elements, etc.).
But before that I want to reboot YellowCast and get App Lot into BETA...