dominoGuru.com

Your Development & Design Resource

Adding Facebook Like to my IBM Lotus Notes Domino Custom Blog

Adding Facebook Like 
to my IBM Lotus Notes Domino Custom Blog 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:

Facebook 
Like on posts from dominoGuru.com

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...


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.