Forum Discussion
3 Replies
madhukar1100 - For the count, you can use the rest API to pull the number and display. Here is a similar thread to this.
To add a kudos button, you'd have to create your own via REST API- http://lithosphere.lithium.com/t5/developers-discussion/REST-API-on-giving-a-Kudos/m-p/3482#M729
I hope this helps.
- madhukar11009 years agoMentor
Hi,
I tried copy pasting the code that you have given, but it didnt worked.
Can you help me to get the correct code that needs to be added.
- kandulmadhu9 years agoAdvisor
Hi madhukar1100,
To add kudos functionality in a custom component:
Create a button in html and then on click of that button make an ajax call to
" 'community-baseURL'/restapi/vc/messages/id/'message-id'/kudos/give "
Before making this ajax call, you will have to validate whether the user is signed in, because anonymous user cannot give kudo to any post.
This should work.
Let me know if you face any issues in this approach.
Regards,
Madhu
Related Content
- 4 years ago
- 10 years ago