# like count

You can easily implement requests to get and count likes for a chat room. As an option, you can periodically update the like count.

# How to use the library

The library does not have any presets that need to be issued an API KEY or set in the CMS. Please read the information below and proceed.


  1. Follow the contents of Overview.

  2. Write the appropriate code in script.js referring to the Methods below.

new LikeCounter({
  roomId: channelKey // chat roomID
  , likeButton: "#sendLike" // tag to which the click event will be applied ID(#sendLike) or CLASS(.sendLike)
  , likeCount: "#likeCounter" // The tag where the number of likes will be exposed ID(#sendLike) or CLASS(.sendLike)
  , likeEvent: function (res) { // Event when like is clicked
    console.log(res)
  }
})
1
2
3
4
5
6
7
8

  • parameter value (* is required)
Value Type Description
roomId* String chat roomID
likeButton* String Liked button tag
likeCount* String tag to be counted
likeEvent Function Return event after sending likes
  • res object
Value Type Description
res String Success in sending likes (true or false)
Copyright 2022. E7Works Inc. & JOYTUNE Corp. All Rights Reserved.