Working with Activity Likes

boolsetLiked=true;GetSocial.LikeActivity(activityId,setLiked,post=>{Debug.Log("Activity was successfully liked");// You can check if activity is liked by calling// bool isLiked = post.IsLikedByMe;},error=>{Debug.LogWarning("Failed to like an activity, error: "+error.Message);});

If you want to unlike activity, pass false as parameter setLiked.

We handle data consistency, so if you’re trying to like already liked activity, or dislike not liked activity, operation will call successful callback without any changes.

GetSocial.GetActivityLikers(activityId,offset,limit,users=>{Debug.Log("Successfully retrieved a list of activity likers!");showUsersList(users);},error=>{Debug.LogWarning("Failed to get a list of activity likers, error: "+error.Message);});

Where offset and limit is pagination parameters, for example, to get first 50 users, who liked a post, use offset=0 and limit=50, to get next page - offset=50, limit=50 etc.