2

I'm developing one Like functionality for users. Iam getting userId by using following code but how can i get multiple users using REST API because i want to then compare with current user if its already liked article then i dont want to allow that user to like .Any help would be appreciatable.

function getUserId() {

var requestUri = AppWebUrl+ "/_api/web/currentUser";
var executor = new SP.RequestExecutor(AppWebUrl);
executor.executeAsync({
    url: requestUri,
    Method: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    contentType: "application/json",
    success: console.log(userid),
    error: onError
});
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.