What are the advantages of Integrating Facebook into the XPages
- You don’t want to look into other browser pages to look for feeds
- Social Collaboration and day to day activities can be update easily in your intranet environment
How to integrate?
Need to integrate Facebook API in to the XPages using Script Tags
<script> (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js .src = “//connect. facebook.net/en_US/all.js#xfbml=1”;
fjs .parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’)); </script>
The FB like button will be visible if the following code is included in the snippet
<div class=”fb-like” data-href= “https://www.maargasystems.com” data-send=”true” data-width= “450” data-show-faces =”true”></ div>
The FB Comments can be included with the following code. ‘posts’ tag can display the number of tweets and ‘data-width’ actually can specify the width.
<div class=”fb-comments” data-href=”https://dominotemplatedev.maargasystems.com/Webinar/SocialeRecruiter.nsf/xpTwitter.xsp” data-num-posts= “4” data-width =”470″></ div>
*Note: The API of the facebook may change.ย Look at the Facebook site for the updated API.