We have created a community of type customer service, in which we have customized chatter functionality with custom UI, using ConnectApi, while we are able to perform other operations, but we are not able to upvote using below code.
ConnectApi.ChatterFeeds.updateLikeForFeedElement(Network.getNetworkId(), feedItemId, true);
Following error is occurring in the code.
ConnectApi.ChatterFeeds.updateLikeForFeedElement(String, String, Boolean) 11:38:14.0 (36940798)|METHOD_EXIT|||ConnectApi.ChatterFeeds.updateLikeForFeedElement(String, String, Boolean) 11:38:14.0 (37080707)|FATAL_ERROR|System.NoAccessException: Insufficient Privileges: You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.