<br />
<b>Deprecated</b>:  YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php</b> on line <b>60</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php</b> on line <b>416</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php</b> on line <b>181</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php</b> on line <b>77</b><br />
{"id":1997,"date":"2013-08-24T22:56:06","date_gmt":"2013-08-24T20:56:06","guid":{"rendered":"https:\/\/blog.sharedove.com\/adisjugo\/?p=1997"},"modified":"2013-08-24T22:56:06","modified_gmt":"2013-08-24T20:56:06","slug":"follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social","status":"publish","type":"post","link":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/","title":{"rendered":"Follow a document on behalf of an user in SharePoint 2013 social"},"content":{"rendered":"<p>Following documents on behalf of users in a common and obligatory task in enterprise social scenarios. Think of onboarding procedures: each employee must follow the &#8220;company rules&#8221; document, and get notified when this document periodically updates.<\/p>\n<p>This is not possible with SharePoint Client Object Model, bit it is an easy exercise with SharePoint Server Object Model.<br \/>\n<!--more--><\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\nusing (SPSite site = new SPSite(siteName))\n{\n    SPServiceContext context = SPServiceContext.GetContext(site);\n\n    UserProfileManager profileManager = new UserProfileManager(context);\n\n    if (profileManager.UserExists(username))\n    {\n        UserProfile userProfile = profileManager.GetUserProfile(username);\n\n        \/\/get the Social Feed Manager of the current user\n        SPSocialFeedManager feedManager = new SPSocialFeedManager(userProfile, context);\n\n        \/\/But, since the FollowingManager property of the feedManager is not aware of the user context, feed manager is in THIS scenario useless\n        \/\/we need to create SPSocialFollowingManager object in user context, and to use that for the following purposes\n        SPSocialFollowingManager followingManager = new SPSocialFollowingManager(userProfile, context);\n\n        SPSocialActorInfo actor = new SPSocialActorInfo();\n        actor.ActorType = SPSocialActorType.Document;\n        actor.ContentUri = new Uri(tofollow);\n\n        followingManager.Follow(actor);\n\n    }\n    else\n    {\n        Console.WriteLine(string.Format(&quot;User Profile for user {0} does not exist&quot;, username));\n    }\n}\n<\/pre>\n<p><strong>BE AWARE:<\/strong><\/p>\n<blockquote><p>Following documents is not security trimmed! That means, if the user from your context does not have permissions on a document, you can still make him following it! It does not make much sense, since the feed is security trimmed, so the user won\u2019t get anything from the document in her feed, but it is still \u201cunpleasant\u201d to see the document title among the list of the followed sites. Especially if it is called something like &#8220;List of the employees who are going to be fired in August 2013.docx&#8221;. Please use the search to security trim the documentbefore following it.<\/p><\/blockquote>\n<div class=\"fb-background-color\">\n\t\t\t  <div \n\t\t\t  \tclass = \"fb-comments\" \n\t\t\t  \tdata-href = \"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\"\n\t\t\t  \tdata-numposts = \"59\"\n\t\t\t  \tdata-lazy = \"true\"\n\t\t\t\tdata-colorscheme = \"light\"\n\t\t\t\tdata-order-by = \"time\"\n\t\t\t\tdata-mobile=true>\n\t\t\t  <\/div><\/div>\n\t\t  <style>\n\t\t    .fb-background-color {\n\t\t\t\tbackground:  !important;\n\t\t\t}\n\t\t\t.fb_iframe_widget_fluid_desktop iframe {\n\t\t\t    width: 100% !important;\n\t\t\t}\n\t\t  <\/style>\n\t\t  ","protected":false},"excerpt":{"rendered":"<p>Following documents on behalf of users in a common and obligatory task in enterprise social scenarios. Think of onboarding procedures: each employee must follow the &#8220;company rules&#8221; document, and get notified when this document periodically updates. This is not possible with SharePoint Client Object Model, bit it is an easy exercise with SharePoint Server Object [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[11],"tags":[57,61],"class_list":["post-1997","post","type-post","status-publish","format-standard","hentry","category-development","tag-sharepoint2013","tag-social"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog\" \/>\n<meta property=\"og:description\" content=\"Following documents on behalf of users in a common and obligatory task in enterprise social scenarios. Think of onboarding procedures: each employee must follow the &#8220;company rules&#8221; document, and get notified when this document periodically updates. This is not possible with SharePoint Client Object Model, bit it is an easy exercise with SharePoint Server Object [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\" \/>\n<meta property=\"og:site_name\" content=\"Adis Jugo blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-24T20:56:06+00:00\" \/>\n<meta name=\"author\" content=\"adis.jugo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"adis.jugo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\",\"name\":\"Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\"},\"datePublished\":\"2013-08-24T20:56:06+00:00\",\"author\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.sharedove.com\/adisjugo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Follow a document on behalf of an user in SharePoint 2013 social\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/\",\"name\":\"Adis Jugo blog\",\"description\":\"The Southern Side\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\",\"name\":\"adis.jugo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"caption\":\"adis.jugo\"},\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/","og_locale":"en_US","og_type":"article","og_title":"Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog","og_description":"Following documents on behalf of users in a common and obligatory task in enterprise social scenarios. Think of onboarding procedures: each employee must follow the &#8220;company rules&#8221; document, and get notified when this document periodically updates. This is not possible with SharePoint Client Object Model, bit it is an easy exercise with SharePoint Server Object [&hellip;]","og_url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/","og_site_name":"Adis Jugo blog","article_published_time":"2013-08-24T20:56:06+00:00","author":"adis.jugo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"adis.jugo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/","url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/","name":"Follow a document on behalf of an user in SharePoint 2013 social - Adis Jugo blog","isPartOf":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website"},"datePublished":"2013-08-24T20:56:06+00:00","author":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c"},"breadcrumb":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2013\/08\/24\/follow-a-document-on-behalf-of-an-user-in-sharepoint-2013-social\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.sharedove.com\/adisjugo\/"},{"@type":"ListItem","position":2,"name":"Follow a document on behalf of an user in SharePoint 2013 social"}]},{"@type":"WebSite","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website","url":"https:\/\/blog.sharedove.com\/adisjugo\/","name":"Adis Jugo blog","description":"The Southern Side","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c","name":"adis.jugo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","caption":"adis.jugo"},"url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/comments?post=1997"}],"version-history":[{"count":0,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/1997\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/media?parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/categories?post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/tags?post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}