How to retrieve the users that are following a document using JSOM / REST APIs in SharePoint 2013

Hi everyone,
Does anyone know how to use JSOM / REST APIs to retrieve the users that are following a specific document in SharePoint 2013? 
Thanks in advance,
Nam

Hi Nam,
Please use the sample code to get the followers for the document. Courtesy: Mokhtar
Bepari 
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Social;
ClientContext clientContext = new ClientContext("http://URL");
SocialFollowingManager followingManager = new SocialFollowingManager(clientContext);
SocialActorInfo actorInfo = new SocialActorInfo();
actorInfo.ContentUri = "<documenturl>"; //set the document url.
actorInfo.ActorType = SocialActorType.Document;
//By using the GetFollowed method you can get the people who the current user is following.
ClientResult < SocialActor[] > followedResult = followingManager.GetFollowed(SocialActorTypes.Users);
//By using the GetFollowers() method you can get the people who are following the current user.
ClientResult < SocialActor[] > followersResult = followingManager.GetFollowers();
clientContext.ExecuteQuery();
Once you get the resultset you can iterate like below:
foreach(SocialActor actor in followedResult)
string name = actor.Name;
string imageURL = actor.ImageUri;
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Similar Messages

  • Tzupdater.How it reflects the users that are not using the new USA DST rule

    If I update the JRE with tzupdater or just replace it with newer JRE will the time change according to the time zone I live in because I think that the changes in USA DST will not apply for the most of the other countries.

    Hi,
    You can do this directly in OAM, with option "a" (using auxiliary object class). You configure OAM to use the main person object class (inetorgperson) and then you can associate extra auxiliary object classes to it - and header variables can be set from any of the attributes that are in the user's profile, both main and auxiliary.
    Regards,
    Colin

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • HT1349 how to link the songs that are in itunes to my account so i can to me sales

    how to link the songs that are in itunes to my account so i can to me sale

    You'll need to copy the content on your iPod back to your iTunes library first.  Once you have successfully done that you can safely erase and sync your iPod.
    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How to retrieve the user input in One Step Screenflow

    Hello all,
    I am new in KM. I would like to ask in One Step Screenflow, I have add a inputfield into the ConfirmComponent. How can I retrieve the user input?
    public IRenderingEvent execute(IScreenflowData sfd) throws WcmException
              inp.setLabel(new Label("Delegation:"));
              ConfirmComponent cc = new  ConfirmComponent(ConfirmComponent.OK_CANCEL,this.context.getLocale(),inp);
              String sRid = (String)this.values.get(0);
              RID rid = RID.getRID(sRid, null);
              OneStepScreenflow oscf = new OneStepScreenflow(sfd,this.getAlias(),rid,cc);
              return oscf.execute();
    In the IRenderingEvent , How to retrieve the user input?
    public IRenderingEvent execute(IResource res, Event event ) throws WcmException
              if (event instanceof ConfirmEvent)
                        ConfirmEvent cce = (ConfirmEvent)event;
                        if (ConfirmEvent.CHOICE_YES.equals(cce.getChoice()))
                                  return new InfoEvent(Status.OK, "Done !");
                        else if (ConfirmEvent.CHOICE_NO.equals(cce.getChoice()))
                                  return ConfirmComponent.onNo(event, res.getContext().getLocale());
                        else if (ConfirmEvent.CHOICE_CANCEL.equals(cce.getChoice()))
                                  return ConfirmComponent.onCancel(event, res.getContext().getLocale());
              return new InfoEvent(Status.ABORT, "Aborted.");
    Many Thanks,
    Sunny

    Hello yoga,
    Many Many thanks for your reply again.
    I have just try the class in the thread link.
    There is a error
    "The project was not built since its classpath is incomplete. Cannot find the class file for javax.servlet.http.HttpServletRequest. Fix the classpath then try rebuilding this project."
    The errors occurs because of "extends OneStepComponent"
    public final class NewConfirmInputComponent extends OneStepComponent
    Where can find javax.servlet.http.HttpServletRequest to include it in my classpath?
    Thanks
    Sunny

  • How to retrieve the User Status on WBS Elements

    Hello,   could someone please tell me  how to retrieve the User Status for WBS Elements using ABAP?  Which table stores this information.
    Thanks.

    if you have the OBJNR there was also another FM status  in Se37 [link>>|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/changing-status-620444]
    also look in the similar requirement [discussion|http://sap.ittoolbox.com/groups/technical-functional/sap-bw/wbs-user-status-262089]

  • How to capture the values that are being passed to a function module?

    Hello Experts!
    While executing the transaction SBWP  to send a document the FM 'SO_DYNP_SHORT_MESSAGE' gets triggered as soon as the SEND button is pressed would anybody please let me know how i can capture the values that are being passed to it in the process of sending a document?
    Regards
    Sanguine

    Hi
    well, I'm not asking you to explain about how an implicit enhancement can be done. i was just referring to the two options posted in the reply. Is there any other way out apart from the implicit enhancement option. i do find class CL_BS useful as the Method ADD_RECIPIENT gets triggered . even though there's no attachment option in the screen that pops up after the method ADD_RECIPIENT is triggered. would anybody suggest me as how to proceed further to capture the values though without attachment details
    Regards
    sanguine

  • How to identify the files that are exported but still present in Oracle UCM

    Hello All,
    I am using Oracle UCM 11g on Windows OS.
    I want to know that if i have exported the contents from Oracle UCM to external file system, but keeping the contents and metadata into the Oracle UCM. How one will be able to identify that the contents that are being exported? Will there be any attribute set for any such contents indicating that these contents were exported?
    Your help or hint will help me out in resolving the problem.
    Thanks in Advance
    Dipesh

    Hi Srinath,
    Thanks for the reply.
    I did not find the place where to check this?
    On the content tab of the Repository Manager Applet, what is the column do i need to set for indication that the content is archived?
    Regards
    Dipesh

  • EP6.0: Can't change the Users that are created earlier by somebody else

    Hi,
       I ( have super admin access) am trying to modify/delete some of the users that were created by some body else earlier.
    During Modify, it's not allowing me to change the following (grayed out)
    1> Last name
    2> First name
    3> email add
    Moreover I don't even see the password field where I can reset the password.
    Also when I change the validity period etc, for some reason, the old data come back again after some time.
    The user in question needs some additional access and need resetting of the password and I am not able to do the 2nd.
    Also please note that there is no issue with the User lock, I have checked that already.
    Thanks
    Arunava

    Have u Changed in User Mapping  ?
    Go to 'User Admn' - >User MApping -> search for the User u want -> Do edit .
    If u hav did any LDAP ,u can't change the Fname / Lname here as it's been configured .
    Regards,
    J
    Do Award pts if this's useful.

  • How to seperate the pulses that are acquired from real world according to their pulse heights in LabVIEW.

    Hi everybody,
    Can any one help in getting out this. Actually I am acquiring gamma rays from proportional counter into the LabVIEW, Coming to the analysis part, I need to seperate the pulses according to their pulse heights. After seperating them I need to digitise the pulses that are seperated. So I request you to sort out this as early as possilbe.
    Thanks in advance.
    A.Giridhar Yadav.

    I am confused about your description. You indicate that you are acquiring the signals but then you want to digitize them later? Any signal processed by LabVIEW has already been digitized because the software only works on numbers, not continuous voltages.
    1. How are you acquiring the data from the proportional counter into LV? What DAQ device are you using? What sample rate?
    2. What is the duration of the pulses? Gamma pulses from PMT and scintillators are usually rather short.
    3. Do you have any log amplifiers or other signal conditioning between the detectors and the DAQ device?
    Lynn

  • My old windows is on an external drive, how do retrieve firefox bookmarks that are on the drive?

    I had windows 7 on drive C, now I got new computer with a new windows 7 and I'm using the old drive (C) as an external hard drive, it still has all program files and windows files on it. How do I retrieve my old book marks that are on that hard drive, I did not back them up before.

    You can find the Firefox Profile Folder in this location (replace the x with the proper drive letter):
    * x:\Users\&lt;user&gt;\AppData\Roaming\Mozilla\Firefox\Profiles\&lt;profile&gt;\
    The "Application Data" folder in XP/Win2K and the "AppData" folder in Windows Vista and later Windows 7+ versions are hidden folders.
    *http://kb.mozillazine.org/Show_hidden_files_and_folders
    You can use this button to go to the current Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder

  • How to retrieve the user id that is visiting my web page

    Hello,
    I wonder if somebody could help...
    I have an applet in one of my web pages.
    I would like to control who is visiting that applet , and with "who" I mean the user id that he/she used to logon to the PC. So what I want is to keep in a file , all the users id that are accessing to that page.
    Is this possible? How can I get the user id from an html page?
    Thanks in advance and regards,
    Patty

    If your applet is being run by people all over the web, then the "user ID" isn't going to be very meaningful to you. And frankly the ID that I use to log on to my home PC is none of your business anyway.
    However if your applet is to be used in a company intranet, where user IDs are meaningful and not duplicates, you can useSystem.getProperty("user.name")to find that out. You will have to sign your applet for that to work, which means that the user will have to click on a box approving potential security issues before your applet will run, but that should not be a problem in a company intranet environment.

  • History somehow set to private, how or can i retrieve the days that are not showing due to private setting.

    somehow my history was set to private by another user and now I need to find out how to restore this info for the days that it was set to private . there was very important sites that I had went and now my hdd crashed and i no longer have them stored what do i do ?

    In PB mode data is only kept in memory by Firefox and not saved to disk, so an undelete utility like Recuva won't help. It is possible that your firewall keeps a log of visited websites, so you can take a look there.

  • How to download the files, that are located in server, from the client?

    Hello folks,
    My program is like that, the files are located in the server and stored in file system.
    I can only know the server name and the directory listing, so that I can show the file names from that directory on the browser.
    The user might downloads those files from the browser and he might deletes those files through the browser.
    That user has valid right to do so and the files can be any type of extension.
    So how can I write this kind of program? Currently the whole system is in struts, so how can I make compatible with struts technology?
    Do u have any ideas?
    Regards,
    Phyo

    Thank you, grigpm. But actually I want the user to select the file that he wants to download rather than setting it in the configuration file. If it is possible, let me see the sample code of FileManager servlet. I've tried with some ways but I can only download from the same server with the application server. I want to download from different server. I hope someone can help me with sample code....
    Best regards,
    Phyo

  • How to zero the values that are greater than 0 at time 0?

    Hello, New user,
    I would like to know how to zero values that are greater than 0 at time 0.  I am totalizing gas flow and understand how not to add the negative numbers but am unsure about the positive numbers at 0 flow.  I hope I have explained this good enough.
    Thank you,
    Lisa

    I don't understand why the value which should be 0 is actually greater than 0.
    How do you determine that the value should be 0, such as no flow, even if the value is greater than 0?
    Ryan Shi
    Hello Ryan,
    The system itself may have an offset of 0.1 V which in the program is related to flow.  I do not wish to add this .1 as flow.  I want to beable to reset the values to 0 and then when there is flow, to add the flow.   If you purchase a program from some vendors you can zero the channel, that is my goal.  I want this to be automatic when a switch is pressed.  Such as:  for 20 seconds, average channel, and use that value as 0 flow then add flow??   I was told averaging may work??
    Thank you again,
    Lisa Williamson

Maybe you are looking for

  • FEBE backup no longer works, please help

    It will not backup, I don't know what else I can tell you.

  • It possible using javascript to change the value of another jsf text field?

    In my case, I have an input text field and would like to copy it's value on the onchange() event into another text field. Using the destination text field's Id and assigning some content with it's .value property

  • Photos from Computer - Quality Reduced

    When I used Itunes to transfer photos from my compuer that where already fairly small in size (a batch of photos that I had already reduced in size for e-mail). I tunes further compressed / reduced them to the point they look horrible. From the compu

  • Getting Errors in ACC 10.2

    Hi all, We are using ATG 10.2 version, and in our developments we customized ProductCatalog repository, SiteRepository, ProfileAdapterRepository and others, adding new properties or updating existing properties. But we have found a problem accessing

  • Portal 7.1 u2 and DS 6.2 database corruption

    Has anyone had any issues with installing portal using DS 6.2 ? I configured portal 7.1 u2 three seperate times and each time after the configure finished I would recycle AM and it would give me a no-config available error because one of the services