How to Add a Facebook Widget to your Team Site


You may also be interested in: Secure SharePoint with User Claims White Paper from Titus


 

Editor’s note: Contributor Alexandru Dionisie is an Internet Professional and Technical Writer. Follow him @tutorialeoffice

Using some components from SharePoint (web Parts) we are able to add a Facebook widget into a SharePoint Team Site.

How do we do it?


<div id="fb-root"></div> 
<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&appId=155174084566571"; 
  fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 
<div class="fb-like-box" data-href="http://www.facebook.com/tutorialeoffice" data-width="300" data-height="500" data-show-faces="false" data-stream="true" data-header="true"></div>

  • copy the code into a text document (*.txt);
  • upload the text document into the Site Assets library (for this example I’ve used SharePoint Designer).

  • now, go into the desired page and enter into Edit Page mode;
  • insert a Content Editor web part;

  • open the Properties pane for that widget;
  • in the Content Link box add the location of the uploaded text document.

After you add the link, close all the opened windows and save the page.

Now you will see a Facebook widget in your SharePoint page.

For everything SharePoint and Office 365 from the community for the community!