Saturday, July 5, 2014

SharePoint is Content Management Portal (CMP). And being CMP it has facility to store the documents. SharePoint not only stores documents but also manage them. Manage means: Upload, Edit, Manage versions, and important one is collect the feedbacks from others and save it. The feedback is collected in the form of comments and rating. SharePoint 2013 provides comment feature for all document libraries.

Now if you have Yammer as social site then you will want: Update everyone within group/network about document being uploaded or updated. Start the social conversations around the documents which is called as conversations in Yammer and Commenting in SharePoint. SharePoint commenting feature is there but it does not help to do anything with Yammer. Now the question arises how to get Yammer conversations on SharePoint documents? The answer is Yammer Embed code.

In previous article we saw all options of integration with Embedding code. And the Comment Embed code is important in this scenario. Now let see how we can use Yammer Comments embed to start conversations around each document in document library. Each document has its own conversations. When the first end user posts something about document then open graph object gets created. It is also known as OG (Open Graph) object. Users can do all social activities: Liking, replying, sharing, etc. To achieve this we will put Comment embed code on Document library's view properties page : Dispform.aspx page.

Steps to put the embed code:

1. Create a html file and put below code (replace network with your network) in it and save it.

<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({
 network: "network.com",
 container: "#embedded-feed",
 feedType: "open-graph"
});

</script>

2. Upload the file to the Site Asset library of the SharePoint.

3. Go to the document library where you want to implement Comment embed code.

4. Open properties page(dispForm.aspx) of any document.

5. Open this page in edit mode.

6. Add content editor web part.

7. Give the url of uploaded html file in Content link section of content editor web part(web part properties) .

8. Save the page. You are ready to use comment feed.



Now when the first user posts something with this embed section a open graph object gets created in yammer and it starts conversation for that document. Each document in this library will have separate open graph object, it means every document will have unique conversation thread.
In this way embed is integrated with SharePoint document. The document sharing with all instantly; Collaboration is so easy.

About security and permission on document? The document library is placed in SharePoint so it will take SharePoint permissions and security. And security of post/ Object graph comes under Yammer security and permissions.In this way we saw how to use OG object.

Happy SharePoint coding.

0 comments:

Post a Comment