Tuesday, July 8, 2014


In previous post we saw how to put multiple groups feed on the single page. This is one of the advantages of Yammer embed over web part. In this post we will see how to show different important personals feed on the page.

Sometime Organization wants to display updates from their key personal on the portal. This helps employees to get updates from these key personals on the portal and on the single page; no need of extra page navigation. You can implement this with Yammer embedding for user.Lets see how we can do it.

Steps to add multiple User’s feed on SharePoint page:

      1.      Create a html file with below code.
  
        <select id="selectGroup">
        <option value="userid1">User 1 </option>
        <option value="userid2">User 2 </option>
        </select>
        <div id="embedded-feed" style="height:800px;width:400px;"></div>  
        <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script src="https://assets.yammer.com/assets/platform_embed.js"></script>
        <script>
                yam.connect.embedFeed({
                container: "#embedded-feed",
                network: "network.com",
                feedType: "user",
                feedId: "userid1"}); 
                $( "#selectGroup" ).change(function() {               
                $( "#embedded-feed" ).html("");
                yam.connect.embedFeed({ 
                container: "#embedded-feed", 
                network: "network.com", 
                feedType: "user", 
                feedId: this.value});
               }); 
     </script>


      2.      Upload file to the Site assets library.
      3.      Go to the SharePoint page where you want to implement multiple Users’s feed.
      4.      Open page in edit mode.
      5.      Add content editor web part and edit properties.

      


      6.      Give above html file path in content link of web part.

      7.      Save and close the page. You are ready to use your new component.



Now all employees can see updates from key personal easily. They can also post reply, they can like and share posts from their itself. Embeds are easy way to implement such requirements easily and quickly. Embed coding takes less time to develop components in compare with REST coding. They also provides real time updates also.


In this way we learn how to put multiple users feed on the page.

Happy SharePoint coding.

0 comments:

Post a Comment